Skip to content

Commit 5a97873

Browse files
committed
make more general for repo list to apply to entire account
1 parent d422c78 commit 5a97873

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
TARGET_ENVS="dpc-test dpc-prod"
1+
TARGET_ENVS="cdap-test cdap-prod"

terraform/services/ecr-cleanup/main.tf

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
locals {
22
full_name = "${var.app}-${var.env}-ecr-cleanup"
33

4-
repo_list_by_app_env = {
5-
dpc = {
6-
test = ["dpc-web-admin", "dpc-web-portal"]
7-
prod = []
8-
}
4+
repo_list_by_env = {
5+
test = ["dpc-web-admin", "dpc-web-portal"]
6+
prod = []
97
}
108
}
119
module "standards" {
@@ -59,7 +57,7 @@ resource "aws_ssm_parameter" "repo_list" {
5957
name = "/${var.app}/${var.env}/ecr-cleanup/repos"
6058
type = "SecureString"
6159
description = "Comma-separated list of ECR repository names to clean up"
62-
value = jsonencode(local.repo_list_by_app_env[var.app][var.env])
60+
value = jsonencode(local.repo_list_by_env[var.env])
6361
}
6462

6563
data "archive_file" "ecr_cleanup" {

0 commit comments

Comments
 (0)