Long time, no see.
While maintaining the terraform state for the infrastructure my team owns, we noticed a specific change that kept coming up when updating an Azure Function App hosted on a Linux plan.
This change was about hidden-link tags being removed from a Linux Function App and while we went along with the plan the first few times, later it started becoming a bit annoying. Nothing's like a perfect green terraform plan.
After doing a bit of research of course I found other engineers having the same issue and the above approach is appropriate for our use case. *links at the bottom
The tags above are automatically added by Azure and they are used to link the function app with the application insights instance.
One of the suggested solutions to this is to add the following block to the resource. After re-running the plan you should not get the changes again.
lifecycle = {
ignore_changes = [
tags["hidden-link: /app-insights-instrumentation-key"],
tags["hidden-link: /app-insights-resource-id"],
tags["hidden-link: /app-insights-conn-string"]
]
}
see you next time.
Similar issues found
- Terraform Hidden Links for Azure Function App - Stack Overflow
- azurerm_application_insights_*_test creates hidden tag that always reflects a "change" (when inside modules) · Issue #24371 · hashicorp/terraform-provider-azurerm · GitHub
- Appinsights hidden-link tags are beeing added and removed over and over · Issue #16569 · hashicorp/terraform-provider-azurerm · GitHub
- Appinsights hidden-link tags are beeing added and removed over and over · Issue #16569 · hashicorp/terraform-provider-azurerm · GitHub
- Appinsights hidden-link tags are beeing added and removed over and over · Issue #16569 · hashicorp/terraform-provider-azurerm · GitHub
Comments