diff --git a/aws/ecs/cluster/main.tf b/aws/ecs/cluster/main.tf index d56b0bb..4fc9209 100644 --- a/aws/ecs/cluster/main.tf +++ b/aws/ecs/cluster/main.tf @@ -3,6 +3,8 @@ */ resource "aws_ecs_cluster" "ecs_cluster" { name = var.cluster_name == "" ? "${var.app_name}-${var.app_env}" : var.cluster_name + + tags = var.tags } /* diff --git a/aws/ecs/cluster/vars.tf b/aws/ecs/cluster/vars.tf index 6c4bb6f..f010234 100644 --- a/aws/ecs/cluster/vars.tf +++ b/aws/ecs/cluster/vars.tf @@ -15,12 +15,18 @@ variable "app_env" { * Optional variables */ +variable "amiFilter" { + type = string + default = "amzn2-ami-ecs-hvm-*-x86_64-ebs" +} + variable "cluster_name" { description = "name of the ECS cluster - if blank, the cluster name will be \"app_name-app_env\" - if not blank, app_name and app_env are not required" default = "" } -variable "amiFilter" { - type = string - default = "amzn2-ami-ecs-hvm-*-x86_64-ebs" +variable "tags" { + type = map(any) + description = "Map of tags to add to the ECS service. Duplicate tags will be overridden." + default = {} }