From 68714bffa5ff011d106385990272f220ccb7775d Mon Sep 17 00:00:00 2001 From: Josh Ross Date: Tue, 9 Feb 2021 11:18:02 -0500 Subject: [PATCH 1/2] Add image tag mutability variable to ecr module --- main.tf | 5 +++-- variables.tf | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index ad27e6cd..f71bc1d1 100644 --- a/main.tf +++ b/main.tf @@ -3,8 +3,9 @@ module "ecr" { version = "0.32.2" enabled = var.codepipeline_enabled - attributes = ["ecr"] - scan_images_on_push = var.ecr_scan_images_on_push + attributes = ["ecr"] + scan_images_on_push = var.ecr_scan_images_on_push + image_tag_mutability = var.ecr_image_tag_mutability context = module.this.context } diff --git a/variables.tf b/variables.tf index 411857dc..05946a54 100644 --- a/variables.tf +++ b/variables.tf @@ -896,3 +896,9 @@ variable "deployment_controller_type" { description = "Type of deployment controller. Valid values are CODE_DEPLOY and ECS" default = "ECS" } + +variable "ecr_image_tag_mutability" { + type = string + default = "IMMUTABLE" + description = "The tag mutability setting for the ecr repository. Must be one of: `MUTABLE` or `IMMUTABLE`" +} From e8cd7e73c15c5416d354b807a0cf9ae9612cc88c Mon Sep 17 00:00:00 2001 From: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:29:17 +0000 Subject: [PATCH 2/2] Auto Format --- README.md | 1 + docs/terraform.md | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 0a148382..5d24c3eb 100644 --- a/README.md +++ b/README.md @@ -249,6 +249,7 @@ Available targets: | delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no | | deployment\_controller\_type | Type of deployment controller. Valid values are CODE\_DEPLOY and ECS | `string` | `"ECS"` | no | | desired\_count | The desired number of tasks to start with. Set this to 0 if using DAEMON Service type. (FARGATE does not suppoert DAEMON Service type) | `number` | `1` | no | +| ecr\_image\_tag\_mutability | The tag mutability setting for the ecr repository. Must be one of: `MUTABLE` or `IMMUTABLE` | `string` | `"IMMUTABLE"` | no | | ecr\_scan\_images\_on\_push | Indicates whether images are scanned after being pushed to the repository (true) or not (false) | `bool` | `false` | no | | ecs\_alarms\_cpu\_utilization\_high\_alarm\_actions | A list of ARNs (i.e. SNS Topic ARN) to notify on CPU Utilization High Alarm action | `list(string)` | `[]` | no | | ecs\_alarms\_cpu\_utilization\_high\_evaluation\_periods | Number of periods to evaluate for the alarm | `number` | `1` | no | diff --git a/docs/terraform.md b/docs/terraform.md index f7b0f6c0..ab074695 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -93,6 +93,7 @@ | delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.
Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no | | deployment\_controller\_type | Type of deployment controller. Valid values are CODE\_DEPLOY and ECS | `string` | `"ECS"` | no | | desired\_count | The desired number of tasks to start with. Set this to 0 if using DAEMON Service type. (FARGATE does not suppoert DAEMON Service type) | `number` | `1` | no | +| ecr\_image\_tag\_mutability | The tag mutability setting for the ecr repository. Must be one of: `MUTABLE` or `IMMUTABLE` | `string` | `"IMMUTABLE"` | no | | ecr\_scan\_images\_on\_push | Indicates whether images are scanned after being pushed to the repository (true) or not (false) | `bool` | `false` | no | | ecs\_alarms\_cpu\_utilization\_high\_alarm\_actions | A list of ARNs (i.e. SNS Topic ARN) to notify on CPU Utilization High Alarm action | `list(string)` | `[]` | no | | ecs\_alarms\_cpu\_utilization\_high\_evaluation\_periods | Number of periods to evaluate for the alarm | `number` | `1` | no |