Skip to content
main
Switch branches/tags
Code

Terraform AWS Label Module

The Terraform Amazon Web Services (AWS) Label module generates consistent label names and tags for Terraform resources.


Inputs

  • region

    • description: AWS Region used to host Terraform resources.
    • type: string
    • default: us-west-1

  • namespace

    • description: Namespace, generally your organization or department name (for example, AWS)
    • type: string
    • default: testenv

  • env

    • description: Environment name (for example, sit, uat, or prod)
    • type: string
    • default: testns

  • account

    • description: AWS account name or number.
    • type: string
    • default: testacc

  • name

    • description: Stack name
    • type: string
    • default: testname

  • delimiter

    • description: Character such as a slash (/) used between name, namespace, and env to form the resource name.
    • type: string
    • default: -

  • attributes

    • description: Additional attributes.
    • type: list
    • default: []

  • tags

    • description: Additional tags.
    • type: map
    • default: {}


Usage

module "label" {

source    = "aws-ia/label/aws"

version   = "0.0.1"

region    = "us-east-1"

namespace = "my org"

env       = "sit"

account   = "aws-account-name"

name      = "deployment name"

delimiter = "-"

tags      = tomap({ propogate_at_launch = "true", "terraform" = "true" })

}


Outputs

  • tags - List of tags.

  • id - ID of a tag delimited with a dash (-).

  • name - Stack name.

  • namespace - Namespace.

  • account - AWS account.

  • env - Environment name.

  • attributes - List of additional attributes.