Skip to content

Commit 1d45aad

Browse files
committed
aws ecr terraform
1 parent 6e324ed commit 1d45aad

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ansible/roles/deploy-ecs-proxies/templates/terraform/locals.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ ecs_service = [
5454
'${local.account_id}.dkr.ecr.eu-west-2.amazonaws.com/'
5555
+ service_id + '_' + container.name
5656
+ (
57-
":ecs-{{ build_label }}" if var.use_ecs_tag and container.name == "canary_canary-api"
57+
":ecs-{{ build_label }}"
58+
if use_ecs_tag and container.name == "canary-canary-api"
5859
else ":{{ build_label }}"
5960
)
6061
}
@@ -65,6 +66,7 @@ ecs_service = [
6566
]
6667

6768

69+
6870
exposed_service = element(matchkeys(local.ecs_service, local.ecs_service.*.expose, list(true)), 0)
6971

7072
private_alb_arn_suffix = data.terraform_remote_state.pre-reqs.outputs.private_alb_arn_suffix

azure/templates/deploy-service.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ steps:
233233
export DEPLOYED_VERSION="${{ parameters.fully_qualified_service_name }}"
234234
fi
235235
236+
export TF_VAR_use_ecs_tag=$([[ "${is_pull_request}" == "false" ]] && echo true || echo false)
237+
export use_ecs_tag=$TF_VAR_use_ecs_tag
238+
236239
account=${{ parameters.aws_account }} \
237240
PROXY_VARS_FILE="${proxy_vars_file}" \
238241
SOURCE_COMMIT_ID="$(Build.SourceVersion)" \

0 commit comments

Comments
 (0)