Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tag "DataClassificationFed" with default value "Direct Impact" #28

Closed
wants to merge 1 commit into from

Conversation

herman-wong-cf
Copy link
Contributor

Add tag "DataClassificationFed" with default value "Direct Impact".

merge() is used to merge the tags:
https://developer.hashicorp.com/terraform/language/functions/merge

If more than one given map or object defines the same key or attribute, then the one that is later in the argument sequence takes precedence.

The precedence is as follows:

  1. Tags defined in variable "global_tags"
  2. Tags defined in variable "tags"
  3. Statically defined tags in ec2.tf

If you don't define tags that override "DataClassificationFed", the default value will be used:

tags                                 = {
          + "App"                   = "Management"
          + "CNAME"                 = "mgtcorewbstn"
          + "DataClassificationFed" = "Direct Impact"
          + "Name"                  = "mgtcorewbstn"
          + "OSType"                = "Windows"
          + "PatchGroup"            = "1"
          + "Role"                  = "windowsbastion"
          + "Schedule"              = "DefaultOfficeHours"
          + "managed_by"            = "terraform"
        }

If you DO define a "tags" variable with a value to "DataClassificationFed":

tags                                 = {
          + "App"                   = "Management"
          + "CNAME"                 = "mgtcorewbstn"
          + "DataClassificationFed" = "Federal data"
          + "Name"                  = "mgtcorewbstn"
          + "OSType"                = "Windows"
          + "PatchGroup"            = "1"
          + "Role"                  = "windowsbastion"
          + "Schedule"              = "DefaultOfficeHours"
          + "managed_by"            = "terraform"
        }

@herman-wong-cf
Copy link
Contributor Author

This addresses #27

@az-kennedy
Copy link
Contributor

Checking with the OC team on this one. We need guidance on using resource tags or doing global provider tags

@herman-wong-cf
Copy link
Contributor Author

Spoke with Thomas Kennedy, this will be set via the aws provider default_tags.

@herman-wong-cf herman-wong-cf deleted the add_default_data_classification_tag branch October 23, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants