terraform-provider-azurerm: Terraform detects and applies changes in azurerm_windows_web_app even though the configuration is not changed
Is there an existing issue for this?
- I have searched the existing issues
Community Note
- Please vote on this issue by adding a π reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave β+1β or βme tooβ comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version
1.1.7
AzureRM Provider Version
3.0.2
Affected Resource(s)/Data Source(s)
azurerm_windows_web_app
Terraform Configuration Files
resource "azurerm_windows_web_app" "appservice" {
name = "${var.environment.shortlocation}-tf-appw-${var.ProjectName}-${var.DeployStage}"
location = azurerm_resource_group.rootrsgp01.location
resource_group_name = azurerm_resource_group.rootrsgp01.name
service_plan_id = azurerm_service_plan.appserviceplan.id
client_affinity_enabled = true
site_config {
ftps_state = "AllAllowed"
always_on = true
managed_pipeline_mode = "Integrated"
minimum_tls_version = 1.2
# remote_debugging = false
use_32_bit_worker = false
websockets_enabled = true
application_stack {
current_stack = "dotnet"
dotnet_version = "v6.0"
}
}
logs {
detailed_error_messages = true
failed_request_tracing = true
}
backup{
name = "appservicedailybackup"
enabled = true
storage_account_url = "https://${azurerm_storage_account.storageccount01.name}.blob.core.windows.net/${azurerm_storage_container.appcontainer.name}${data.azurerm_storage_account_sas.stablobsas.sas}&sr=b"
schedule {
frequency_interval = 1
frequency_unit = "Day"
keep_at_least_one_backup = true
retention_period_days = 4
}
}
}
Debug Output/Panic Output
2022-04-05T08:54:53.5369453Z [1m # azurerm_windows_web_app.appservice[0m will be updated in-place[0m[0m
2022-04-05T08:54:53.5370327Z [0m [33m~[0m[0m resource "azurerm_windows_web_app" "appservice" {
2022-04-05T08:54:53.5371809Z [1m[0mid[0m[0m = "/subscriptions/f9d805c8-0231-4f5d-adc0-4e0dc34c9c2c/resourceGroups/dewc-TF-RSGP-adspaceIO-dev-01/providers/Microsoft.Web/sites/dewc-tf-appw-adspaceIO-dev-01"
2022-04-05T08:54:53.5372431Z [1m[0mname[0m[0m = "dewc-tf-appw-adspaceIO-dev-01"
2022-04-05T08:54:53.5372780Z [1m[0mtags[0m[0m = {}
2022-04-05T08:54:53.5373076Z [90m# (18 unchanged attributes hidden)[0m[0m
2022-04-05T08:54:53.5373512Z
2022-04-05T08:54:53.5373640Z
2022-04-05T08:54:53.5373750Z
2022-04-05T08:54:53.5374075Z [33m~[0m [0mlogs {
2022-04-05T08:54:53.5374503Z [90m# (2 unchanged attributes hidden)[0m[0m
2022-04-05T08:54:53.5374749Z
2022-04-05T08:54:53.5375150Z [31m-[0m [0mapplication_logs {
2022-04-05T08:54:53.5375687Z [31m-[0m [0m[1m[0mfile_system_level[0m[0m = "Error" [90m->[0m [0m[90mnull[0m[0m
2022-04-05T08:54:53.5376040Z
2022-04-05T08:54:53.5376396Z [31m-[0m [0mazure_blob_storage {
2022-04-05T08:54:53.5377293Z [31m-[0m [0m[1m[0mlevel[0m[0m = "Error" [90m->[0m [0m[90mnull[0m[0m
2022-04-05T08:54:53.5377938Z [31m-[0m [0m[1m[0mretention_in_days[0m[0m = 0 [90m->[0m [0m[90mnull[0m[0m
2022-04-05T08:54:53.5378379Z }
2022-04-05T08:54:53.5378568Z }
2022-04-05T08:54:53.5378676Z
2022-04-05T08:54:53.5378907Z [31m-[0m [0mhttp_logs {
2022-04-05T08:54:53.5379034Z
2022-04-05T08:54:53.5379274Z [31m-[0m [0mfile_system {
2022-04-05T08:54:53.5379806Z [31m-[0m [0m[1m[0mretention_in_days[0m[0m = 0 [90m->[0m [0m[90mnull[0m[0m
2022-04-05T08:54:53.5380257Z [31m-[0m [0m[1m[0mretention_in_mb[0m[0m = 35 [90m->[0m [0m[90mnull[0m[0m
2022-04-05T08:54:53.5380578Z }
2022-04-05T08:54:53.5380765Z }
2022-04-05T08:54:53.5380965Z }
2022-04-05T08:54:53.5381049Z
2022-04-05T08:54:53.5381264Z [33m~[0m [0msite_config {
2022-04-05T08:54:53.5381579Z [90m# (23 unchanged attributes hidden)[0m[0m
2022-04-05T08:54:53.5381735Z
2022-04-05T08:54:53.5381984Z [33m~[0m [0mapplication_stack {
2022-04-05T08:54:53.5382298Z [32m+[0m [0m[1m[0mcurrent_stack[0m[0m = "dotnet"
2022-04-05T08:54:53.5382653Z [90m# (1 unchanged attribute hidden)[0m[0m
2022-04-05T08:54:53.5383755Z }
2022-04-05T08:54:53.5383959Z }
2022-04-05T08:54:53.5384203Z [90m# (2 unchanged blocks hidden)[0m[0m
2022-04-05T08:54:53.5384467Z }
2022-04-05T08:54:53.5384550Z
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
- terraform validate
- terraform plan
- terraform apply
Important Factoids
No response
References
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 29
- Comments: 21 (3 by maintainers)
We are also facing the same issue for Linux Appservice without any changes and showing everytime on the plan and causing the application to restart,
I have updated to latest TF Version : 1.4.6 and latest RM Provider : 3.58.0 still facing the same issue.
Just to add to @silambarasan , we are having the same problem with the windows_web_app:
Same here
@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.