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

Changing the azurerm_function_app storage_connection_string causes a recreate when it shouldn't #5435

Closed
kraihn opened this issue Jan 17, 2020 · 2 comments · Fixed by #6304
Closed

Comments

@kraihn
Copy link
Contributor

kraihn commented Jan 17, 2020

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 (and AzureRM Provider) Version

Terraform v0.12.19

  • provider.azurerm v1.41.0

Affected Resource(s)

  • azurerm_function_app

Terraform Configuration Files

resource "azurerm_resource_group" "example" {
  location = "eastus"
  name     = "function-stg-test"
}

resource "azurerm_storage_account" "example" {
  account_replication_type = "LRS"
  account_tier             = "Standard"
  location                 = azurerm_resource_group.example.location
  name                     = "funcstgtest92783"
  resource_group_name      = azurerm_resource_group.example.name
}

resource "azurerm_app_service_plan" "example" {
  location            = azurerm_resource_group.example.location
  name                = "function-stg-test-asp-23232"
  resource_group_name = azurerm_resource_group.example.name
  kind                = "functionapp"

  sku {
    tier = "Dynamic"
    size = "Y1"
  }
}

resource "azurerm_function_app" "example" {
  app_service_plan_id       = azurerm_app_service_plan.example.id
  location                  = azurerm_app_service_plan.example.location
  name                      = "function-stg-test928732"
  resource_group_name       = azurerm_app_service_plan.example.resource_group_name
  storage_connection_string = azurerm_storage_account.example.primary_blob_connection_string
//    storage_connection_string = azurerm_storage_account.example.secondary_blob_connection_string
}

Debug Output

Panic Output

Expected Behavior

I expect the storage_connection_string to change without disrupting the existing Function App.

Actual Behavior

The Function App is marked and run as a recreate when only the storage_connection_string has changed. There isn't a comment in the plan that states the storage_connection_string is the cause of the recreate either.

Steps to Reproduce

  1. terraform apply
  2. Change the connection string being used from primary to secondary.
  3. terraform apply

Important Factoids

Testing in normal Azure, East US

References

@ghost
Copy link

ghost commented Apr 23, 2020

This has been released in version 2.7.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.7.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented May 23, 2020

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.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.