You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am expecting to go in azure portal Home → dev-walter → fn4-test → Configuration and see only one change: the value of the app setting DUMMY
Actual Behaviour
The app settings DUMMY is correctly set to 2 while the WEBSITE_CONTENTSHARE changed from staging-content to fn4-test-content even if within the plan there is no evidence that setting is going to change.
This is very dangerous because it can cause an "hidden swap" of the running software from a stable version to an unstable one.
Steps to Reproduce
terraform apply
Deploy on the "production" slot version 1.0 of your function
Deploy on "staging" slot version 2.0 of your function
Go to the portal and swap staging and production slots. When your run the swap azure behind the hood also swap the values inside the settings WEBSITE_CONTENTSHARE.
- before the swap: production is equal to fn4-test-content staging is equal to staging-content
- after the swap: production is equal to staging-content production is equal to fn4-test-content
(as far as I know this is how azure works) Now version 2.0 runs in production while version 1.0 is in stating
Edit your terraform configuration file: for instance change the value of the app settings DUMMY
terraform apply
Check the plan on the standard output: the only change highlighted is the value of the DUMMY app settings like in the example above
As soon as the apply is completed you will find out version 1.0 runs in production while version 2.0 is in stating unexpectedly.
Important Factoids
References
Since I am stucking with this issue blocking me to any further changes in my function apps running in production I've tried to fix the provider.
Here my PR
Basically I don't see the reason to set inside the provider the value for WEBSITE_CONTENTSHARE.
I prefer to set it within my terraform configuration file:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Terraform (and AzureRM Provider) Version
Affected Resource(s)
azurerm_function_app
azurerm_function_app_slot
Terraform Configuration Files
Debug Output
I changed the value of the DUMMY app settings from 1 to 2 and this is the only change I see running the plan command:
Panic Output
Expected Behaviour
I am expecting to go in azure portal Home → dev-walter → fn4-test → Configuration and see only one change: the value of the app setting DUMMY
Actual Behaviour
The app settings DUMMY is correctly set to 2 while the WEBSITE_CONTENTSHARE changed from staging-content to fn4-test-content even if within the plan there is no evidence that setting is going to change.
This is very dangerous because it can cause an "hidden swap" of the running software from a stable version to an unstable one.
Steps to Reproduce
terraform apply
- before the swap: production is equal to fn4-test-content staging is equal to staging-content
- after the swap: production is equal to staging-content production is equal to fn4-test-content
(as far as I know this is how azure works)
Now version 2.0 runs in production while version 1.0 is in stating
terraform apply
Important Factoids
References
Since I am stucking with this issue blocking me to any further changes in my function apps running in production I've tried to fix the provider.
Here my PR
Basically I don't see the reason to set inside the provider the value for WEBSITE_CONTENTSHARE.
I prefer to set it within my terraform configuration file:
production
staging
Then I don't want to change them with following apply. Provided that I am also putting the lifecycle block in the definition of the function
Also refer to these issues:
The text was updated successfully, but these errors were encountered: