Bicep script overwrites/reset instance specific settings after Azure App Service slot swap #13885
andsj073
started this conversation in
Authoring Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Rerunning a Bicep script - that declares an App having at least one deployment slot App - after a slot swap action, resets any and all instance specific settings in all slots, thus breaking runtime functionality.
The reason is that a deployment state changing action (the slot swap) is performed outside of the Bicep realm which is declarative and enforces a desired state.
Schematically
Example Bicep declaration
In particular SettingA could be
WEBSITE_CONTENTSHARE
pointing out the file share where the deployed code, assemblies etc reside. This setting and its instance-unique value follows its instance to the slot during swap, but later a new run of the Bicep resets the value which breaks the runtime of production slot.Resolution?
Surely, there must be many people that have struggled with this already. I can't find anything about it though. What is the best way to solve this?
I realize that a hack could be to read (using Bicep) any existing settings of the deployed production App and implement some logic to find existing Production settings that should not be reset during Bicep deployment.
But is that really the way? Seems ugly, cumbersome and brittle.
Much grateful for any ideas!
Beta Was this translation helpful? Give feedback.
All reactions