Reploying the same resources, even when no change? #7001
-
Bicep version az bicep version Describe the bug Why is bicep not skipping deployment when nothing changed in subsequent runs? main.bicep:
This took close to 19 mins to deploy and without further changes same the same amount of time each time ? Where is the preflight to check nothing changed? If preflight in there then it should not have reployed the same config next time az deployment group create is executed? To Reproduce Additional context Mac OSX 12.4 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
ARM Template (and Bicep) deployments have no representation of state to know if a resource is already deployed or not. It naively sends the PUT request to the RP to create/update the resource and it is up to relevant resource provider to be efficient with a no-op like that. There is no guarantee they are being efficient. We would recommend opening up a support ticket for this particular issue. |
Beta Was this translation helpful? Give feedback.
-
Coming from AWS, the behavior is surprising and means you have to think twice on how you setup your cicd pipelines. It makes it unnatural to manage your code and infra in the same repository and pipeline, which I prefer in many cases. One way to deal with this is to make a check for changes to the bicep files in the pipeline before deploying the infrastructure. |
Beta Was this translation helpful? Give feedback.
ARM Template (and Bicep) deployments have no representation of state to know if a resource is already deployed or not. It naively sends the PUT request to the RP to create/update the resource and it is up to relevant resource provider to be efficient with a no-op like that. There is no guarantee they are being efficient. We would recommend opening up a support ticket for this particular issue.