diff --git a/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/data_transfer_service.tf b/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/data_transfer_service.tf index fd161ef..d3847ba 100644 --- a/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/data_transfer_service.tf +++ b/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/data_transfer_service.tf @@ -50,7 +50,7 @@ resource "aws_ecs_task_definition" "transfer_task" { container_definitions = jsonencode([ { name = "pillarbox-monitoring-transfer" - image = "${local.ecr_repository}/pillarbox-monitoring-transfer:latest" + image = "${local.ecr_repository}/pillarbox-monitoring-transfer:${local.ecr_image_tag}" readonlyRootFilesystem = true # Port mapping for the container diff --git a/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/locals.tf b/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/locals.tf index a84cdb5..2ac09d5 100644 --- a/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/locals.tf +++ b/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/locals.tf @@ -4,7 +4,7 @@ locals { ecs_cluster_name = "${var.application_name}-cluster" is_prod = terraform.workspace == "prod" ecr_repository = "${var.account_ids["prod"]}.dkr.ecr.${data.aws_region.current.name}.amazonaws.com" - + ecr_image_tag = local.is_prod ? "stable" : "latest" opensearch = { domain_name = "${var.application_name}-search" @@ -33,4 +33,4 @@ locals { "srg-businessowner" = "pillarbox" "srg-environment" = terraform.workspace } -} \ No newline at end of file +} diff --git a/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/sse_broker_service.tf b/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/sse_broker_service.tf index 489ad54..a15f789 100644 --- a/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/sse_broker_service.tf +++ b/pillarbox-monitoring-terraform/20-pillarbox-monitoring-app/sse_broker_service.tf @@ -275,7 +275,7 @@ resource "aws_ecs_task_definition" "dispatch_task" { container_definitions = jsonencode([ { name = "pillarbox-event-dispatcher" - image = "${local.ecr_repository}/pillarbox-event-dispatcher:latest" + image = "${local.ecr_repository}/pillarbox-event-dispatcher:${local.ecr_image_tag}" readonlyRootFilesystem = true portMappings = [