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

azurerm_linux_function_app - WEBSITE_CONTENTSHARE setting does not update after apply #28434

Open
1 task done
sitengyu-hc opened this issue Jan 7, 2025 · 1 comment
Open
1 task done

Comments

@sitengyu-hc
Copy link
Collaborator

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.9.8

AzureRM Provider Version

4.14.0

Affected Resource(s)/Data Source(s)

azurerm_linux_function_app

Terraform Configuration Files

provider "azurerm" {
  features {}
  subscription_id = "xxxxx"
}


resource "azurerm_resource_group" "test" {
  name     = "test165138"
  location = "West US 2"
}

resource "azurerm_storage_account" "test" {
  name                     = "test165138"
  resource_group_name      = azurerm_resource_group.test.name
  location                 = azurerm_resource_group.test.location
  account_tier             = "Standard"
  account_replication_type = "LRS"
}

resource "azurerm_service_plan" "test" {
  name                = "test165138"
  location            = azurerm_resource_group.test.location
  resource_group_name = azurerm_resource_group.test.name
  os_type             = "Linux"
  sku_name            = "EP1"
}

resource "azurerm_linux_function_app" "test" {
  name                = "test165138"
  location            = azurerm_resource_group.test.location
  resource_group_name = azurerm_resource_group.test.name
  service_plan_id     = azurerm_service_plan.test.id

  storage_account_name       = azurerm_storage_account.test.name
  storage_account_access_key = azurerm_storage_account.test.primary_access_key

  builtin_logging_enabled = true

  app_settings = {
    foo                  = "bar"
    secret               = "sauce"
    WEBSITE_CONTENTSHARE = "custom-asdf"
  }

  site_config {}
}

Debug Output/Panic Output

# azurerm_linux_function_app.test will be updated in-place
  ~ resource "azurerm_linux_function_app" "test" {
      ~ app_settings                                   = {
          ~ "WEBSITE_CONTENTSHARE" = "custom-asdf" -> "custom-hjkl"

Expected Behaviour

The planned change to WEBSITE_CONTENTSHARE is actually made on this resource.

Actual Behaviour

Apply succeeds, but value is not updated in portal.

Steps to Reproduce

Apply to create the resource with a custom WEBSITE_CONTENTSHARE

Change WEBSITE_CONTENTSHARE to something else, plan will show e.g.:

Terraform will perform the following actions:

azurerm_linux_function_app.test will be updated in-place

~ resource "azurerm_linux_function_app" "test" {
~ app_settings = {
~ "WEBSITE_CONTENTSHARE" = "custom-asdf" -> "custom-hjkl"

Apply succeeds, but value is not updated in portal. Subsequent plan will show the same planned change above.

Important Factoids

No response

References

Found this is a tested value in the provider:

WEBSITE_CONTENTSHARE = "test-acc-custom-content-share"

@xiaxyi
Copy link
Contributor

xiaxyi commented Jan 9, 2025

Thanks @sitengyu-hc for raising this issue, let me test the feature and update once I have any thoughts

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

3 participants