Skip to content

Commit

Permalink
UML-3115 Correct PDF version
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Ainsworth committed Oct 11, 2023
1 parent 3e9b629 commit fcf6939
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions terraform/environment/region.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module "eu_west_1" {

container_version = var.container_version
admin_container_version = var.admin_container_version
pdf_container_version = local.environment.pdf_container_version

sirius_account_id = local.environment.sirius_account_id

Expand Down
7 changes: 7 additions & 0 deletions terraform/environment/region/data_sources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ data "aws_ecr_repository" "use_an_lpa_pdf" {
name = "pdf_service"
}

data "aws_ecr_image" "pdf_service" {
repository_name = "pdf_service"
image_tag = var.pdf_container_version
provider = aws.management
}


data "aws_ecr_repository" "use_an_lpa_admin_app" {
provider = aws.management
name = "use_an_lpa/admin_app"
Expand Down
2 changes: 1 addition & 1 deletion terraform/environment/region/pdf_ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ locals {
pdf_app = jsonencode({
cpu = 1,
essential = true,
image = "${data.aws_ecr_repository.use_an_lpa_pdf.repository_url}:${var.container_version}",
image = "${data.aws_ecr_repository.use_an_lpa_pdf.repository_url}@${data.aws_ecr_image.pdf_service.image_digest}",
mountPoints = [],
name = "pdf",
portMappings = [
Expand Down
5 changes: 5 additions & 0 deletions terraform/environment/region/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,9 @@ variable "session_expiry_warning" {
variable "session_expires_use" {
description = "The number of seconds before the session expires for the use service."
type = string
}

variable "pdf_container_version" {
description = "The image tag to use for the PDF container."
type = string
}

0 comments on commit fcf6939

Please sign in to comment.