diff --git a/README.md b/README.md index 05ab82b..3c03a1f 100644 --- a/README.md +++ b/README.md @@ -121,16 +121,17 @@ Available targets: |------|-------------|:----:|:-----:|:-----:| | attributes | Additional attributes (e.g. `1`) | list(string) | `` | no | | chmod_command | Template of the command executed on the private key file | string | `chmod 600 %v` | no | -| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | string | `-` | no | +| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | string | `-` | no | +| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no | | generate_ssh_key | If set to `true`, new SSH key pair will be created | bool | `false` | no | -| name | Application or solution name (e.g. `app`) | string | - | yes | -| namespace | Namespace (e.g. `eg` or `cp`) | string | `` | no | +| name | Solution name, e.g. 'app' or 'jenkins' | string | `` | no | +| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | string | `` | no | | private_key_extension | Private key extension | string | `` | no | | public_key_extension | Public key extension | string | `.pub` | no | | ssh_key_algorithm | SSH key algorithm | string | `RSA` | no | | ssh_public_key_path | Path to SSH public key directory (e.g. `/secrets`) | string | - | yes | -| stage | Stage (e.g. `prod`, `dev`, `staging`) | string | `` | no | -| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | map(string) | `` | no | +| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | string | `` | no | +| tags | Additional tags (e.g. `map('BusinessUnit','XYZ')` | map(string) | `` | no | ## Outputs @@ -228,7 +229,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. ## Copyright -Copyright © 2017-2019 [Cloud Posse, LLC](https://cpco.io/copyright) +Copyright © 2017-2020 [Cloud Posse, LLC](https://cpco.io/copyright) diff --git a/docs/terraform.md b/docs/terraform.md index 4c497db..c366b3d 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -4,16 +4,17 @@ |------|-------------|:----:|:-----:|:-----:| | attributes | Additional attributes (e.g. `1`) | list(string) | `` | no | | chmod_command | Template of the command executed on the private key file | string | `chmod 600 %v` | no | -| delimiter | Delimiter to be used between `namespace`, `stage`, `name` and `attributes` | string | `-` | no | +| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes` | string | `-` | no | +| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | string | `` | no | | generate_ssh_key | If set to `true`, new SSH key pair will be created | bool | `false` | no | -| name | Application or solution name (e.g. `app`) | string | - | yes | -| namespace | Namespace (e.g. `eg` or `cp`) | string | `` | no | +| name | Solution name, e.g. 'app' or 'jenkins' | string | `` | no | +| namespace | Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp' | string | `` | no | | private_key_extension | Private key extension | string | `` | no | | public_key_extension | Public key extension | string | `.pub` | no | | ssh_key_algorithm | SSH key algorithm | string | `RSA` | no | | ssh_public_key_path | Path to SSH public key directory (e.g. `/secrets`) | string | - | yes | -| stage | Stage (e.g. `prod`, `dev`, `staging`) | string | `` | no | -| tags | Additional tags (e.g. map(`BusinessUnit`,`XYZ`) | map(string) | `` | no | +| stage | Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release' | string | `` | no | +| tags | Additional tags (e.g. `map('BusinessUnit','XYZ')` | map(string) | `` | no | ## Outputs diff --git a/main.tf b/main.tf index 30fff52..36a474c 100644 --- a/main.tf +++ b/main.tf @@ -1,11 +1,12 @@ module "label" { - source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0" - namespace = var.namespace - stage = var.stage - name = var.name - attributes = var.attributes - delimiter = var.delimiter - tags = var.tags + source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0" + namespace = var.namespace + stage = var.stage + environment = var.environment + name = var.name + attributes = var.attributes + delimiter = var.delimiter + tags = var.tags } locals { diff --git a/variables.tf b/variables.tf index 99a6433..2b7be45 100644 --- a/variables.tf +++ b/variables.tf @@ -1,24 +1,31 @@ variable "namespace" { type = string - description = "Namespace (e.g. `eg` or `cp`)" default = "" + description = "Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp'" +} + +variable "environment" { + type = string + default = "" + description = "Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT'" } variable "stage" { type = string - description = "Stage (e.g. `prod`, `dev`, `staging`)" default = "" + description = "Stage, e.g. 'prod', 'staging', 'dev', OR 'source', 'build', 'test', 'deploy', 'release'" } variable "name" { type = string - description = "Application or solution name (e.g. `app`)" + default = "" + description = "Solution name, e.g. 'app' or 'jenkins'" } variable "delimiter" { type = string default = "-" - description = "Delimiter to be used between `namespace`, `stage`, `name` and `attributes`" + description = "Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`" } variable "attributes" { @@ -30,7 +37,7 @@ variable "attributes" { variable "tags" { type = map(string) default = {} - description = "Additional tags (e.g. map(`BusinessUnit`,`XYZ`)" + description = "Additional tags (e.g. `map('BusinessUnit','XYZ')`" } variable "ssh_public_key_path" {