-
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
Terraform detects and applies changes in azurerm_windows_web_app even though the configuration is not changed #16257
Comments
It happens to me to. In my case with the component
It keeps adding the environment variables. See an extract of the
No matter the resource configuration. I actually have added the properties:
But as I said, the plan keeps adding those configuration values every time making a restart of the app service in the process which is a problem, because I cannot deploy any infrastructure change without restarting all the services without the need. |
@truptisatardekar As the doc says, the property indicates whether all outbound traffic from the app is routed through the virtual network. A setting value of 1 indicates that all traffic is routed through the virtual network. Can you confirm if your app meets the behavior? Also, can you share your TF config with me? |
Hello @xiaxyi |
Hi, @truptisatardekar , @xiaxyi I faced exact same issue with "empty current stack settings issue". After some inspection, I've noticed that current_stack settings are always being reset if "site_config" is not changed during other updates. I made Pull Requests for addressing/fixing this issue. #17490 |
I too am facing this issue where it seems to want to update the
|
@KangDroid @truptisatardekar Here's the plan that I applied: After applying the above, current_stack for both the app service and the slot were cleared. See second apply: |
Hi, I applied another patch after I submit PR, but I literally forgot to add another PR since busy things are on-going on my work; Basically what I found was : if sites configuration changes, it also resets site-config. I will submit PR to this repo probably today(if time permits though) but if you are in hurry, can you try cherry-pick this commit to your own provider and see if fully resolved site-config issue? |
@KangDroid no worries, this is not an urgent issue (for us at least). As far as I can tell the app service still works with the current_stack property missing, and reapplying the same configuration adds the property back in. |
I have the same issue with resource "azurerm_linux_web_app" "this" {
# ... other resource configuration ...
logs {
http_logs {
file_system {
retention_in_days = 30
retention_in_mb = 35
}
}
detailed_error_messages = true
failed_request_tracing = true
}
} The configuration for ~ logs {
# (2 unchanged attributes hidden)
~ http_logs {
~ file_system {
~ retention_in_days = 0 -> 30
# (1 unchanged attribute hidden)
}
}
} |
Make sure you don't have WEBSEITE_HTTPLOGGING_RETENTION_DAYS at configuration section |
The environment variable I would expect the |
@SebastianBalle please check the terraform.tfstate as well. My guess based on
|
@jincod The state file also does not contain any information around the |
Just to add to @silambarasan , we are having the same problem with the windows_web_app: |
@stephybun I've put some detail description about the second problem in this ticket. The issue with the "WEBSITE_HTTPLOGGING_RETENTION_DAYS" variable and the "retention_in_days" setting is:
however, setting "retention_in_days" is the way to do and of course also present in the state In our case it causes the following:
on the next run, terraform plan detects the missing "retention_in_days" setting and updates it, which is what you actually see as the unwanted change. |
Since this issue is related to another resource, i've created a ticket specifically for the log_retention bug: |
Is there an existing issue for this?
Community Note
Terraform Version
1.1.7
AzureRM Provider Version
3.0.2
Affected Resource(s)/Data Source(s)
azurerm_windows_web_app
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Terraform plan should not have detected changes in the azurerm_windows_web_app because the configuration file is not changed at all.
Actual Behaviour
Terraform plan always detects and applies the same changes for the azurerm_windows_web_app in every TF Plan and TF Apply execution although the configuration for azurerm_windows_web_app has not been changed at all.
Steps to Reproduce
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: