Provides both tag validation as well as ensuring required tags are populated.
Example:
module "tags" {
source = "clowdhaus/tags/aws"
application = "serverless-gitops-infrastructure"
environment = "nonprod"
repository = "github.com/serverless-delivery/serverless-gitops-infrastructure"
}From this module, the output will provide tags in the following format:
{
"Application" = "serverless-gitops-infrastructure",
"CreatedBy = "terraform"
"DeployedBy" = "arn:aws:iam::012345678910:role/terraform-role",
"Environment" = "nonprod",
"Repository" = "github.com/serverless-delivery/serverless-gitops-infrastructure"
}
As well as a formatted output for use in autoscaling groups with tag propogation:
[
{
key = "Application",
value = "serverless-gitops-",
propogate_at_launch = true
}, {
key = "CreatedBy,
value = "terraform",
propagate_at_launch = true
},
key = "DeployedBy",
value = "arn:aws:iam::012345678910:role/terraform-role",
propagate_at_launch = true
}, {
key = "Environment",
value = "nonprod",
propagate_at_launch = true
}, {
key = "Repository",
value = "github.com/serverless-delivery/serverless-gitops-infrastructure",
propagate_at_launch = true
}
]
| Name | Version |
|---|---|
| terraform | >= 1.5.7 |
| aws | >= 6.0 |
| Name | Version |
|---|---|
| aws | >= 6.0 |
No modules.
| Name | Type |
|---|---|
| aws_caller_identity.current | data source |
| aws_iam_session_context.current | data source |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| application | Application name and/or identifier | string |
null |
no |
| created_by | The framework, tool, and/or method that created this resource - terraform, serverless, pulumi, manual, etc. | string |
"terraform" |
no |
| environment | The environment does this resource belong to? - sandbox, nonprod, prod | string |
n/a | yes |
| repository | The repository name where this resource is managed and codified | string |
n/a | yes |
| Name | Description |
|---|---|
| asg_tags | Tags which are appropriate auto scaling group (i.e. as a list of maps). See: https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html |
| tags | Tags which are applicable to all resources - map of {key: value} pairs |
Apache-2.0 Licensed. See LICENSE.