From 075164fe5cea73e7d26a3c5a756fce753829dba2 Mon Sep 17 00:00:00 2001 From: vijay-veeranki-moj Date: Mon, 3 Jun 2019 11:41:00 +0100 Subject: [PATCH 1/4] Remove ecr-lifecycle-policy from the module --- main.tf | 24 ------------------------ variables.tf | 5 ----- 2 files changed, 29 deletions(-) diff --git a/main.tf b/main.tf index 771853e..98e84fb 100644 --- a/main.tf +++ b/main.tf @@ -5,30 +5,6 @@ resource "aws_ecr_repository" "repo" { name = "${var.team_name}/${var.repo_name}" } -resource "aws_ecr_lifecycle_policy" "lifecycle_policy" { - count = "${var.enable_policy ? 1 : 0}" - repository = "${aws_ecr_repository.repo.name}" - - policy = < Date: Mon, 3 Jun 2019 11:41:46 +0100 Subject: [PATCH 2/4] Increase the module version in example ecr.tf --- examples/ecr.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ecr.tf b/examples/ecr.tf index 40c11f2..715278f 100644 --- a/examples/ecr.tf +++ b/examples/ecr.tf @@ -5,7 +5,7 @@ * */ module "example_team_ecr_credentials" { - source = "github.com/ministryofjustice/cloud-platform-terraform-ecr-credentials?ref=3.3" + source = "github.com/ministryofjustice/cloud-platform-terraform-ecr-credentials?ref=3.4" repo_name = "example-module" team_name = "example-team" From feb20cd6bf8a4392f871d1df8733c5cc89e64f23 Mon Sep 17 00:00:00 2001 From: vijay-veeranki-moj Date: Mon, 3 Jun 2019 11:42:26 +0100 Subject: [PATCH 3/4] update the readme related to ecr-lifecycle policy --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 780d52c..f5e82b0 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,6 @@ Note: From version 3.0 of this module, The AWS region will default to eu-west-2 |------|-------------|:----:|:-----:|:-----:| | repo_name | name of the repository to be created | string | - | yes | | team_name | name of the team creating the credentials | string | - | yes | -| enable_policy | Sets a ECR lifecycle policy to delete every image after count 100 | string | true | yes | aws_region | region into which the resource will be created | string | eu-west-2 | no | providers | provider creating resources | arrays of string | default provider | no From 318aa919e86cd25c1a96d0f5023739e0ea0deea9 Mon Sep 17 00:00:00 2001 From: vijay-veeranki-moj Date: Mon, 3 Jun 2019 13:33:42 +0100 Subject: [PATCH 4/4] Updated the terraform version tag in ci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d6db4a5..61a97bf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 terraform: &terraform docker: - - image: hashicorp/terraform:light + - image: hashicorp/terraform:0.11.11 working_directory: /tmp/workspace/terraform jobs: