Skip to content

Commit

Permalink
Merge pull request #91 from BarnumD/ecs-tags
Browse files Browse the repository at this point in the history
Add tags for ECS
  • Loading branch information
briskt authored Oct 30, 2023
2 parents 000aa82 + a449918 commit dc88bae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions aws/ecs/cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/*
Expand Down
12 changes: 9 additions & 3 deletions aws/ecs/cluster/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
}

0 comments on commit dc88bae

Please sign in to comment.