Provides both tag validation as well as ensuring required tags are populated.
module "tags" {
source = "shared/tags"
application = "Access to AWS storage environment"
creator = "terraform"
created = "2023-08-22"
account = "arn:aws:iam::012345678910:role/terraform-role"
environment = "production"
billing = "OS-Climate"
origin = "github.com/os-climate/terraform/terraform/shared/tags"
}
From this module, the output will provide tags in the following format:
{
"application" = "Access to AWS storage environment",
"creator" = "terraform"
"created" = "2023-08-22"
"account" = "arn:aws:iam::012345678910:role/terraform-role",
"environment" = "production",
"billing" = "OS-Climate",
"origin" = "github.com/os-climate/terraform/terraform/shared/tags"
}
Code example:
[
{
key = "application",
value = "Access to AWS storage environment",
propogate_at_launch = true
}, {
key = "creator,
value = "terraform",
propagate_at_launch = true
},
key = "created",
value = "2023-08-22T15:43",
propagate_at_launch = true
}, {
key = "account",
value = "arn:aws:iam::012345678910:role/terraform-role",
propagate_at_launch = true
}, {
key = "environment",
value = "production",
propagate_at_launch = true
}, {
key = "billing",
value = "OS-Climate",
propagate_at_launch = true
}, {
key = "origin",
value = "github.com/os-climate/terraform/terraform/shared/tags",
propagate_at_launch = true
}
]
Name | Version |
---|---|
aws | N/A |
No modules.
Name | Type |
---|---|
aws_caller_identity.current | data source |
aws_caller_identity.current.user_id | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
application | Application name and/or identifier | string |
null |
yes |
creator | The framework, tool, and/or method that created this resource - terraform, serverless, pulumi, manual, etc. | string |
"terraform" |
yes |
creator | The date this resource was created in %Y-%m-%d format | string |
"terraform" |
yes |
account | The IAM user or role that deployed the infrastructure | string |
n/a | yes |
environment | The environment does this resource belong to? - sandbox, nonprod, prod | string |
n/a | yes |
billing | The organisation/project/entity responsible for resource costs | string |
n/a | yes |
origin | The repository where the relevant code is stored | string |
n/a | yes |
Name | Description |
---|---|
tags | Tags which are applicable to all resources - map of {key: value} pairs |