When I try to connect to the app logs from portal:
Failed to log container logs: Resource containerlog of type text not found.
And
Unable to fetch the host status of your function app. To use log streaming, please make sure your function host is running.
Expected Behaviour
When the function app gets created with an isolated app service plan within the app service environment the first deployment goes well and the app starts running even without the content_share_force_disabled flag and no warning. For any update the app breaks.
When it is set to true it should be kept true after update.
Actual Behaviour
When the content_share_force_disabled flag is not set to true the update of terraform (even like adding an test=test app config) breaks the function and and the container can not start.
When I set the content_share_force_disabled flag to true that solves the problem but when I run the apply or plan command I can see every time that the status of the flag is set to false and it will be modified to true.
If the flag is set to true it should be kept true.
Where the documentation of the content_share_force_disabled flag can be found?
Deploy the build Docker image to ACR.
Use the credentials and the repo name in the terraform script.
Run the terraform apply and deploy the resources to Azure. -> after a while it should be up and running and the app should be available https://.azurewebsites.net/api/HttpExample?name=Functions
Make a small change like adding a "test"="test" to common_app_settings.
Run the apply again and this should break the app. Not even the logs are available because the container can not start.
Use the content_share_force_disabled=true in the function app resource.
Deploy it again and it should work.
If you make any further change you will see that the content_share_force_disabled is always set to false when deployed and it will update to true terraform apply gets executed.
Is there an existing issue for this?
Community Note
Terraform Version
1.2.2
AzureRM Provider Version
3.12.0
Affected Resource(s)/Data Source(s)
azurerm_linux_function_app
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
When the function app gets created with an isolated app service plan within the app service environment the first deployment goes well and the app starts running even without the content_share_force_disabled flag and no warning. For any update the app breaks.
When it is set to true it should be kept true after update.
Actual Behaviour
When the content_share_force_disabled flag is not set to true the update of terraform (even like adding an test=test app config) breaks the function and and the container can not start.
When I set the content_share_force_disabled flag to true that solves the problem but when I run the apply or plan command I can see every time that the status of the flag is set to false and it will be modified to true. If the flag is set to true it should be kept true.
Where the documentation of the content_share_force_disabled flag can be found?
Steps to Reproduce
Used the tutorial app generated with the func tool: https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-function-linux-custom-image?tabs=in-process%2Cpowershell%2Cazure-cli&pivots=programming-language-python#create-supporting-azure-resources-for-your-function
Deploy the build Docker image to ACR. Use the credentials and the repo name in the terraform script.
Run the terraform apply and deploy the resources to Azure. -> after a while it should be up and running and the app should be available https://.azurewebsites.net/api/HttpExample?name=Functions
Make a small change like adding a "test"="test" to common_app_settings. Run the apply again and this should break the app. Not even the logs are available because the container can not start.
Use the content_share_force_disabled=true in the function app resource. Deploy it again and it should work. If you make any further change you will see that the content_share_force_disabled is always set to false when deployed and it will update to true terraform apply gets executed.
Important Factoids
No response
References
No response