Skip to content

Commit 613f5f1

Browse files
committed
ecr terraform release
1 parent f968be0 commit 613f5f1

File tree

1 file changed

+14
-10
lines changed
  • ansible/roles/deploy-ecs-proxies/templates/terraform

1 file changed

+14
-10
lines changed

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

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,32 @@ locals {
4545

4646
ecs_service = [
4747
{% for container in ecs_service %}
48+
49+
{% set image_tag = (
50+
'${local.account_id}.dkr.ecr.eu-west-2.amazonaws.com/'
51+
+ service_id + '_' + container.name
52+
+ (
53+
":ecs-" + build_label
54+
if use_ecs_tag and container.name == "canary-canary-api"
55+
else ":" + build_label
56+
)
57+
)
58+
%}
59+
4860
{{
4961
(
5062
container
5163
| combine(
5264
{
53-
'image':
54-
'${local.account_id}.dkr.ecr.eu-west-2.amazonaws.com/'
55-
+ service_id + '_' + container.name
56-
+ (
57-
":ecs-{{ build_label }}"
58-
if use_ecs_tag and container.name == "canary-canary-api"
59-
else ":{{ build_label }}"
60-
)
65+
'image': image_tag
6166
}
6267
)
6368
) | to_json
6469
}},
70+
6571
{% endfor %}
6672
]
6773

68-
69-
7074
exposed_service = element(matchkeys(local.ecs_service, local.ecs_service.*.expose, list(true)), 0)
7175

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

0 commit comments

Comments
 (0)