CodexBloom - Programming Q&A Platform

Terraform implementation guide Existing Azure Resource Group Tags When Using azurerm Provider

๐Ÿ‘€ Views: 658 ๐Ÿ’ฌ Answers: 1 ๐Ÿ“… Created: 2025-06-18
terraform azure infrastructure-as-code HCL

Does anyone know how to I'm experiencing an scenario where Terraform is not updating the tags for an existing Azure Resource Group. I'm using Terraform version 1.2.0 and the azurerm provider version 2.87.0. My configuration is supposed to update the tags whenever I apply changes, but it seems like the tags are being ignored, and no updates are reflected in the Azure portal. Hereโ€™s a snippet of my Terraform code: ```hcl provider "azurerm" { features {} } resource "azurerm_resource_group" "example" { name = "example-resources" location = "East US" tags = { Environment = "Development" } } output "resource_group_id" { value = azurerm_resource_group.example.id } ``` Iโ€™ve tried changing the tags directly in the code and running `terraform apply` again, but the existing tags remain unchanged. I verified that I have the necessary permissions to modify the resource group, and when I run `terraform plan`, it shows that no changes are required, which confuses me since I expect it to recognize the tag update. I also attempted to use the `terraform taint` command on the resource group to force a recreation, but that didnโ€™t yield any results either. Am I missing something in my configuration or workflow? Is there a known scenario with this version of the azurerm provider regarding tag updates? Any insights would be appreciated! Any help would be greatly appreciated!