-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
ignore_changes in Function app app_settings is ignored #4321
Comments
@katbyte any news? |
Can you try:
Worked for me on: |
looks like this has worked for me too. thanks for posting. |
The description mentions that #1966 didn't work but #1966 (comment) mentions the same solution as #4321 (comment). The additional context in #1966 (comment) was helpful for me (re: the placeholders). |
I don't see how I can simply ignore all app_settings for an azure function provisioned using tf. It must be a pretty basic use case where app settings are set as part of a CI/CD pipeline. Any suggestions? I am looking for something like:
Best workaround I found so far is to just ignore changes to the function app completely and if I require changes do it manually:
|
This should work if I understand your setup correctly:
|
This issue has caused a production system outage for us so +1 |
Ok, so here's where I think the disconnect is: it appears that Terraform will only allow you to ignore specific app_settings if they were originally created from within Terraform. That means that if Azure DevOps created the App Setting (for example, the Conversely, if you first create the @katbyte is it possible to modify the functionality of the |
Specifically, I believe it's a problem with https://github.com/hashicorp/terraform/blob/c05127c2895d003c62d1ed8d76356a1d07682037/terraform/eval_diff.go#L573 - it's looking only to "Managed" lines which is a problem since at least one major use case of ignoring changes is ignoring those changes that are made outside of Terraform. Just because they're managed outside of Terraform does not mean we don't know about them, and we'd like to be able to specify that they should not be touched by Terraform. And I don't think I was super clear in my last post - we want the ability to ignore some changes while allowing the management of other changes, and right now, that kind of granularity is not available to us. Either Terraform can be set to ignore all changes, changes it created itself, or no changes at all. We're looking for the ability to ignore changes that we (the Terraform coder) know about, that Terraform may/should not. |
Since this issue has been reported a long time ago and relates to the version of provider we no longer support - I'm going to close it. Please open a new updated bug report on current versions of terraform and provider if this is still relevant. Thank you. |
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
Description
We are using Azure DevOps to deploy services to Azure.
In this case it's an Azure Function App running on a Linux Consumption Plan.
We want to run apply terraform script for the infrastructure and then deploy the code. This would work, if code is always deployed with the Azure function deploy step. The issue is that Azure DevOps sets the app setting WEBSITE_RUN_FROM_PACKAGE to the url of the package to be run by the function app. Without this, the service will be unavailable with a 503 response.
I am having a hard time getting Terraform to ignore this property, see below.
Terraform (and AzureRM Provider) Version
Terraform 0.12.7
AzureRM Provider 1.28.0
Affected Resource(s)
azurerm_function_app
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
No changes should take place!
Actual Behavior
Steps to Reproduce
terraform plan
Important Factoids
References
I have tried the workaround described in the below issue, it kind of worked once, it's not a sustainable or reliable solution.
The text was updated successfully, but these errors were encountered: