You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While updating dependencies for a project based on our hello-world templates, I ran into this error during a terraform apply:
Error: "tags" are identical to those in the "default_tags" configuration block of the provider: please de-duplicate and try again
In researching this error I ran across an article that described a relatively new feature in the Terraform AWS Provider:
In version 3.38.0 and later of the Terraform AWS Provider, a default_tags argument is available in the provider configuration block. This argument allows for tagging of all resources that currently support the tags argument. It is intended as an alternative to the tedium of applying the same tags repeatedly across all resources.
We defined some default tags as local variables in our template so that we can pass them into resources. With newer versions of the AWS Provider, passing in duplicate or partially duplicate tags into resources causes the plan to fail. We should update this and other hello-world templates to only supply the default tags in the AWS Provider block like so:
While updating dependencies for a project based on our hello-world templates, I ran into this error during a
terraform apply
:In researching this error I ran across an article that described a relatively new feature in the Terraform AWS Provider:
We defined some default tags as local variables in our template so that we can pass them into resources. With newer versions of the AWS Provider, passing in duplicate or partially duplicate tags into resources causes the plan to fail. We should update this and other hello-world templates to only supply the default tags in the AWS Provider block like so:
References:
The text was updated successfully, but these errors were encountered: