-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_linux_function_app: docker block configuration deleted after unrelated change #14702
Comments
Hi @dszakallas - Thanks for opening this issue, and for valuable feedback on the beta resource! It's very much appreciated. I've reproduced, and have a fix for, the [WEBSITE_|WEBSITES_] part of this issue but I'm struggling to get the |
Hi @jackofallops. Thanks for your reply. Nothing else acts on the resource, the removal of the docker configuration is in effect right after applying the plan. I am not 100% sure on this but it seems that these two issues appear together. I couldn't reproduce a disappearing |
Hi @dszakallas - As ever, "it depends". Depending on the use case for the app, they may be required to be set manually. The provider accounts for the cases where they are required but not specified by generating the values (and subsequently filtering them out for the state, which is the source of the problem I've now addressed in #14815 ) However, there are cases where these need to be specified manually, such as when using a storage account that has additional restrictions/policies on it that would prevent Terraform retrieving the data required to populate these settings. If you're happy/willing to try this configuration again after the changes in 14815 are merged and released, could you feed back here with the outcome? NB: I saw from your config you were using the older |
Yes, I am happy to give feedback on #14815. The reason for not using |
I think we're seeing the same issue as point 2, above, across our function apps. Each time we apply a plan that contains a azurerm_linux_function_app resource, the linux_fx_version is cleared in the state and the deployed resource. Re-applying the same configuration results in the linux_fx_version being reset correctly. For example, this plan was generated by Terraform (v1.0.0, azurerm v3.0.2) despite there being no change to the Terraform configuration:
When it was applied, the linux_fx_version string in the state and the Function App changed from "PYTHON|3.8" to an empty string. Re-planning exactly the same configuration then generated this plan:
When it was applied, the linux_fx_version string in the state and the Function App changed back to "PYTHON|3.8". The resource is configured as follows:
This implication of this is that every time we deploy any infrastructure changes, we have to apply them twice, and our Function Apps are broken between the two applies. This is a new issue since we upgraded to v3 of azurerm. |
I've bumped the azurerm provider to version 3.1.0 and moved our application insights key from being set directly as |
I'm also experiencing this issue. It seems to happen every time I change the value of |
I believe this to have been resolved by #16442 (I can't reproduce on v3.3.0 or later), so I'm going to close this for now. If this is still an issue, we can re-open. 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. |
Community Note
Terraform (and AzureRM Provider) Version
Description / Feedback
What happens:
Whenever I change my
azurerm_linux_function_app
resource, thedocker
configuration gets deleted.What should have happened:
The
docker
configuration should stay pristine.Reproducing the issue
The resource in question is
I get the following plan and execute it.
However when running
plan
the second time:There are two issues here:
WEBSITE_
andWEBSITES_
app settings appear as an addition.docker
block appears as an addition.I see (1.) as an annoyance, as the env vars are actually there in the environment, so this bug doesn't cause issues. Maybe they get filtered out when Terraform queries the resource?
However (2.) is actually removed, and the Function App stops working. I have to reapply the plan to get the
docker
configuration back.The text was updated successfully, but these errors were encountered: