I’m working on creating basic AzureML resources using the TF provider. I’m able to create a Workspace with all the associated resources like the Storage Account, the KeyVault etc.
However, every time I run a terraform plan
there would be a diff generated for each of those resources associated with the AzureML Workspace because of an update (being set to null
) to the Created
tag. I’m not adding this tag in the code, so I’m assuming this is being done by AzureML Studio.
# module.workspace["test-ch-02"].azurerm_resource_group.this will be updated in-place
~ resource "azurerm_resource_group" "this" {
id = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-ch-02-0000000"
name = "test-ch-02-0000000"
~ tags = {
- "Created" = "2022-03-24T01:11:56.2613059Z" -> null
# (3 unchanged elements hidden)
}
# (1 unchanged attribute hidden)
}
I’m guessing what’s happening is the following.
- First run creates the resources. While they are created AzureML Studio adds the
Created
tag. - The next time
terraform plan
is run, it detects theCreated
tag as something new, so to be removed. This creates the diff plan. - If we run this plan,
Created
tag gets deleted, but AzureML Studio adds it again, causing this to repeat.
Being AzureML specific resources, can we write this logic into the provider? For an example, ignore changes to the Created
tag within the provider altogether?