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.

hidden-link tags being removed

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