diff --git a/README.md b/README.md index d5c1621..093f60a 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,7 @@ Available targets: | enable\_ecs\_managed\_tags | Specifies whether to enable Amazon ECS managed tags for the tasks within the service | `bool` | `false` | no | | enable\_icmp\_rule | Specifies whether to enable ICMP on the security group | `bool` | `true` | no | | enabled | Set to false to prevent the module from creating any resources | `bool` | `true` | no | +| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | `string` | `""` | no | | health\_check\_grace\_period\_seconds | Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 7200. Only valid for services configured to use load balancers | `number` | `0` | no | | ignore\_changes\_task\_definition | Whether to ignore changes in container definition and task definition in the ECS service | `bool` | `true` | no | | launch\_type | The launch type on which to run your service. Valid values are `EC2` and `FARGATE` | `string` | `"FARGATE"` | no | @@ -434,8 +435,8 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply ### Contributors -| [![Erik Osterman][osterman_avatar]][osterman_homepage]
[Erik Osterman][osterman_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]
[Igor Rodionov][goruha_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]
[Andriy Knysh][aknysh_homepage] | [![Sarkis Varozian][sarkis_avatar]][sarkis_homepage]
[Sarkis Varozian][sarkis_homepage] | -|---|---|---|---| +| [![Erik Osterman][osterman_avatar]][osterman_homepage]
[Erik Osterman][osterman_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]
[Igor Rodionov][goruha_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]
[Andriy Knysh][aknysh_homepage] | [![Sarkis Varozian][sarkis_avatar]][sarkis_homepage]
[Sarkis Varozian][sarkis_homepage] | [![Chris Weyl][rsrchboy_avatar]][rsrchboy_homepage]
[Chris Weyl][rsrchboy_homepage] | +|---|---|---|---|---| [osterman_homepage]: https://github.com/osterman [osterman_avatar]: https://img.cloudposse.com/150x150/https://github.com/osterman.png @@ -445,6 +446,8 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply [aknysh_avatar]: https://img.cloudposse.com/150x150/https://github.com/aknysh.png [sarkis_homepage]: https://github.com/sarkis [sarkis_avatar]: https://img.cloudposse.com/150x150/https://github.com/sarkis.png + [rsrchboy_homepage]: https://github.com/rsrchboy + [rsrchboy_avatar]: https://img.cloudposse.com/150x150/https://github.com/rsrchboy.png [![README Footer][readme_footer_img]][readme_footer_link] [![Beacon][beacon]][website] diff --git a/README.yaml b/README.yaml index ede4bd3..4d6ff73 100644 --- a/README.yaml +++ b/README.yaml @@ -171,3 +171,5 @@ contributors: github: aknysh - name: Sarkis Varozian github: sarkis +- name: Chris Weyl + github: rsrchboy diff --git a/docs/terraform.md b/docs/terraform.md index dcd0b5a..345a0c7 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -34,6 +34,7 @@ | enable\_ecs\_managed\_tags | Specifies whether to enable Amazon ECS managed tags for the tasks within the service | `bool` | `false` | no | | enable\_icmp\_rule | Specifies whether to enable ICMP on the security group | `bool` | `true` | no | | enabled | Set to false to prevent the module from creating any resources | `bool` | `true` | no | +| environment | Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' | `string` | `""` | no | | health\_check\_grace\_period\_seconds | Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 7200. Only valid for services configured to use load balancers | `number` | `0` | no | | ignore\_changes\_task\_definition | Whether to ignore changes in container definition and task definition in the ECS service | `bool` | `true` | no | | launch\_type | The launch type on which to run your service. Valid values are `EC2` and `FARGATE` | `string` | `"FARGATE"` | no | diff --git a/main.tf b/main.tf index fa4fbbb..4251704 100644 --- a/main.tf +++ b/main.tf @@ -1,30 +1,31 @@ module "default_label" { - source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.15.0" - enabled = var.enabled - attributes = var.attributes - delimiter = var.delimiter - name = var.name - namespace = var.namespace - stage = var.stage - tags = var.tags + source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0" + enabled = var.enabled + attributes = var.attributes + delimiter = var.delimiter + name = var.name + namespace = var.namespace + stage = var.stage + environment = var.environment + tags = var.tags } module "task_label" { - source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.15.0" + source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0" enabled = var.enabled && length(var.task_role_arn) == 0 context = module.default_label.context attributes = compact(concat(var.attributes, ["task"])) } module "service_label" { - source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.15.0" + source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0" enabled = var.enabled context = module.default_label.context attributes = compact(concat(var.attributes, ["service"])) } module "exec_label" { - source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.15.0" + source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.16.0" enabled = var.enabled && length(var.task_exec_role_arn) == 0 context = module.default_label.context attributes = compact(concat(var.attributes, ["exec"])) diff --git a/variables.tf b/variables.tf index beac991..1275696 100644 --- a/variables.tf +++ b/variables.tf @@ -10,6 +10,12 @@ variable "namespace" { default = "" } +variable "environment" { + type = string + description = "Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT'" + default = "" +} + variable "stage" { type = string description = "Stage (e.g. `prod`, `dev`, `staging`)"