Simplifies the process of applying the correct AWS tags to Northwood Labs resources.
Information | Description |
---|---|
Terraform Versions | 1.6, 1.7, 1.8 |
OpenTofu Versions | 1.6, 1.7 |
-
Designed to be highly composable, and has no hard-dependencies on other modules.
-
Integration tests run automatically on every commit against supported versions of Terraform/OpenTofu.
-
Outputs can be easily used with other modules or resources which support tagging.
-
Adds tag data about the ARN of the user who performed the deployment, as well as a timestamp of the deployment.
-
Only looks-up data, but does not persist any data itself, making it completely stateless.
-
Purpose-built, meaning that it is designed to solve a single orthogonal problem. Aims to fit 90% of use-cases.
More examples can be found in the ./examples
directory.
# Load the module
module "aws_resource_tags" {
source = "https://github.com/northwood-labs/mod-aws-resource-tags.git?ref={tag}"
app = "sample-app"
env = "sandbox"
}
Name | Provider | Version |
---|---|---|
terraform |
~> 1.6 |
|
aws |
hashicorp/aws | ~> 5.42 |
Req | Variable | Type | Description | Default |
---|---|---|---|---|
✅ | app |
string |
The app tag. Lowercase and hyphenated. |
|
✅ | env |
string |
The env tag. Lowercase. |
|
extra |
map |
Additional (ad hoc) tags to apply. | {} |
Name | Description |
---|---|
app |
The value of the app input variable. |
common_tags |
Most services support simple key = value pairs. |
deployed_at |
The RFC 3339 at which the resources were deployed. |
deployed_by |
The ARN of the assumed role which performed the deployment. |
env |
The value of the env input variable. |
launch_template_resource_tags |
Tags formatted for use with Launch Templates. |
region |
The AWS region in which the resources are being created. |
Kind | Source | Name | Provider |
---|---|---|---|
data source | data.aws_caller_identity |
current |
hashicorp/aws |
data source | data.aws_region |
current |
hashicorp/aws |
For integration tests, we use the Terratest testing framework. All of the building and testing dependencies are bundled-up as a Docker image, so see northwood-labs/dev-env before running these tests.
These tests create real resources, which cost real money.
make test