8000 Reserved app settings like WEBSITE_HTTPLOGGING_RETENTION_DAYS are removed and re-applied during apply, causing app restart on azurerm_windows_web_app · Issue #28802 · hashicorp/terraform-provider-azurerm · GitHub
[go: up one dir, main page]

Skip to content
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

Reserved app settings like WEBSITE_HTTPLOGGING_RETENTION_DAYS are removed and re-applied during apply, causing app restart on azurerm_windows_web_app #28802

Open
1 task done
owattley-rotageek opened this issue Feb 18, 2025 · 0 comments

Comments

@owattley-rotageek
Copy link
owattley-rotageek commented Feb 18, 2025

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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.

Terraform Version

1.10.4

AzureRM Provider Version

4.14.0

Affected Resource(s)/Data Source(s)

azurerm_windows_web_app

Terraform Configuration Files

resource "azurerm_windows_web_app" "app" {
  name                          = "my-app"
  resource_group_name           = "my-resource-group"
  location                      = "northeurope"
  service_plan_id               = "my-service-plan-id"
  site_config {
    health_check_path                 = "/"
    health_check_eviction_time_in_min = 2    
  }
}

----
Apply basic config above, then add scm_ip_restriction
resource "azurerm_windows_web_app" "app" {
  name                          = "my-app"
  resource_group_name           = "my-resource-group"
  location                      = "northeurope"
  service_plan_id               = "my-service-plan-id"
  site_config {
    health_check_path                 = "/"
    health_check_eviction_time_in_min = 2
    scm_ip_restriction {                             # <<< add this
        name                      = "xxx"
        priority                  = 1
        ip_address                = "127.0.0.1"
        action                    = "Allow"      
    }    
  }
}

Debug Output/Panic Output

# azurerm_windows_web_app.app will be updated in-place
~ resource "azurerm_windows_web_app" "app" {
      id                                             = "xxx"
      name                                           = "my-app"
      # (25 unchanged attributes hidden)

    ~ site_config {
          # (29 unchanged attributes hidden)

        + scm_ip_restriction {
            + action                    = "Allow"
            + headers                   = []
            + ip_address                = "127.0.0.1"
            + name                      = "xxx"
            + priority                  = 1
          }
          ...

          # (14 unchanged blocks hidden)
      }

      # (3 unchanged blocks hidden)
  }

Expected Behaviour

When terraform applies a change (e.g. to add an ip restriction) then that should be the only change that is applied to the resource in Azure. No app settings should change.

Actual Behaviour

Ip restriction is added/changed, but also the following behaviour is observed:

App settings managed by the provider (not present in the config) are removed and then re-added as part of the apply. This causes an app restart (technically 2 restarts in quick succession - 1 for removal, 1 for addition).

Specifically:

  • WEBSITE_HTTPLOGGING_RETENTION_DAYS
  • WEBSITE_HEALTHCHECK_MAXPINGFAILURES

Image

Image

Steps to Reproduce

No response

Important Factoids

No response

References

Possibly related:

#23713 (comment)
#26107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant
0