Existing resource group and resource tags creation terraform script

Apply tags to all resources in the resource group

resource “azurerm_tag” “apply_tags” {
for_each = toset(data.azurerm_resources.all_resources.resources[*].id)

In the above code I can’t able to create tags in resource (existing resources)
any other code ?

I want to create tags in all the Existing resource group and inside the resource. manual doing in portal it take more time. so please provide terraform script for this scenorio.

1 Like