-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What-if option does not show changes for modules #5073
Labels
Comments
ghost
added
the
Needs: Triage 🔍
label
Nov 4, 2021
samhughes91
changed the title
what-if on sub-level deployments does not show changes at group-level
What-if option does not show changes for modules
Nov 4, 2021
I just found this issue: #Azure/arm-template-whatif#157 |
Yep, that's the one. We are getting close to fixing that bug, so hopefully will have good updates to share relatively soon. Closing here for now. |
having the same issue! |
was this bug fixed ? |
Latest updates are here: Azure/arm-template-whatif#157 (comment) |
ghost
locked as resolved and limited conversation to collaborators
May 26, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bicep version
Bicep CLI version 0.4.1008 (223b8d2)
Describe the bug
Hey guys,
After about a year of running into statefile issues with Terraform. I'm now in the process of converting our code into Bicep. I have a number of template bicep files to use as modules in my main bicep files. The template files are created at resourceGroup-level, when I run
az deployment group --what-if
the output shows what is to be changed as expected. However, when I use the same file as a module and call it from my main bicep file (targetScope = resourceGroup) withaz deployment group --what-if
. The output shows none of the changes incurred by the module. After confirming and checking I can see that the changes have actually been deployed as shown in the template validation.I'm finding it hard to understand why the changes inflicted by modules do not show in the what-if analysis. This seems to be quite a flaw when comparing it to the Terraform plan option for validation. Can anybody advise me on this matter?
To Reproduce
Steps to reproduce the behavior:
run
az deployment group create -g rg-test-bicep -f rsv-template.bicep --what-if
Output shows RSV will be created:
Run the same code from a module:
Run
az deployment group create -g XXXXXXXXXXX --what-if -f main/main-DELETE.bicep -p env=tst
Output
After confirming the changes I see the resource from the module was created even though it was not mentioned in the sub-level what-if command.
Additional context
I would expect to see the changes from the module in a deployment. Unfortunately I don't see anything. This makes the what-if kind of useless for me. Or am I misunderstanding something?
The text was updated successfully, but these errors were encountered: