terraform-aws-postgresql-rds icon indicating copy to clipboard operation
terraform-aws-postgresql-rds copied to clipboard

Consider how to integrate with default_tags

Open coalkettler opened this issue 4 years ago • 0 comments

Copied from https://github.com/azavea/terraform-aws-vpc/issues/29.

Version 3.38.0 of the Terraform AWS Provider introduced a way to define a default set of tags that propagate to all AWS resources that support tags.

Any tags defined at the resource level are merged with tags defined at the provider level and are accessible via a new read-only attribute, tags_all.

e.g.:

# module.vpc.aws_vpc.default will be created
+ resource "aws_vpc" "default" {
    + arn                              = (known after apply)
    + assign_generated_ipv6_cidr_block = false
    + cidr_block                       = "10.0.0.0/16"
    + default_network_acl_id           = (known after apply)
    + default_route_table_id           = (known after apply)
    + default_security_group_id        = (known after apply)
    + dhcp_options_id                  = (known after apply)
    + enable_classiclink               = (known after apply)
    + enable_classiclink_dns_support   = (known after apply)
    + enable_dns_hostnames             = true
    + enable_dns_support               = true
    + id                               = (known after apply)
    + instance_tenancy                 = "default"
    + ipv6_association_id              = (known after apply)
    + ipv6_cidr_block                  = (known after apply)
    + main_route_table_id              = (known after apply)
    + owner_id                         = (known after apply)
    + tags                             = {
        + "Environment" = "Staging"
        + "Name"        = "vpcStaging"
        + "Project"     = "Something"
      }
    + tags_all                         = {
        + "Environment" = "Staging"
        + "Name"        = "vpcStaging"
        + "Project"     = "Something"
      }
  }

I think we should consider how we'd drop the Environment and Project tags and instructs folks to use default_tags.

coalkettler avatar Sep 02 '21 15:09 coalkettler