Closed drdamour closed 1 year ago
Thanks for opening this issue. This was a problem in the 2.x version of the provider which is no longer actively maintained. If this is still an issue with the 3.x version of the provider please do let us know by opening a new issue, thanks!
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.
If you switch your app plan from standard to dynamic for a function app the special logic for app config vars WEBSITE_CONTENTAZUREFILECONNECTIONSTRING & WEBSITE_CONTENTSHARE implemented as part of https://github.com/terraform-providers/terraform-provider-azurerm/issues/1453 doesn't seem to be accounted for.
additionally if you change the storage account for the function app such that it is recreated, the
WEBSITE_CONTENTAZUREFILECONNECTIONSTRING
does not get updated (butAzureWebJobsStorage
seems to be updated)Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.12.29
Affected Resource(s)
azurerm_function_app
Terraform Configuration Files
at first then switched it to
Debug Output
Panic Output
Expected Behaviour
Expect the WEBSITE_CONTENTAZUREFILECONNECTIONSTRING & WEBSITE_CONTENTSHARE app config settings to be created...or maybe the whole function app to be marked delete & Add needed
Actual Behaviour
WEBSITE_CONTENTAZUREFILECONNECTIONSTRING & WEBSITE_CONTENTSHARE are not created and you get a warning in azure portal about storage being misconfigured
Steps to Reproduce
terraform apply
the initial with standard plan sku to create the function appterraform apply
the updated tfterraform apply
the updated tf notice that WEBSITE_CONTENTAZUREFILECONNECTIONSTRING & WEBSITE_CONTENTSHARE are now presentImportant Factoids
These app configs are weird because they look up the chain of resources (from function app to it's app plan) to figure out if they should conditionally be applied. i'm guessing it's related to being modified in place so nothing knows the functino app is "tainted".
References
1453 - seems to be what originally implemented this