From a612dedb7c28d8c8bf3a98be1cf428fee69226eb Mon Sep 17 00:00:00 2001 From: Mike Halma Date: Fri, 7 Aug 2026 15:48:52 +0100 Subject: [PATCH] SDIT-4100 Transfer movement queue dev --- ...-from-nomis-transfermovements-sub-queue.tf | 121 ++++++++++++++++++ .../resources/irsa.tf | 2 + 2 files changed, 123 insertions(+) create mode 100644 namespaces/live.cloud-platform.service.justice.gov.uk/hmpps-prisoner-from-nomis-migration-preprod/resources/hmpps-prisoner-from-nomis-transfermovements-sub-queue.tf diff --git a/namespaces/live.cloud-platform.service.justice.gov.uk/hmpps-prisoner-from-nomis-migration-preprod/resources/hmpps-prisoner-from-nomis-transfermovements-sub-queue.tf b/namespaces/live.cloud-platform.service.justice.gov.uk/hmpps-prisoner-from-nomis-migration-preprod/resources/hmpps-prisoner-from-nomis-transfermovements-sub-queue.tf new file mode 100644 index 00000000000..77960c7d39d --- /dev/null +++ b/namespaces/live.cloud-platform.service.justice.gov.uk/hmpps-prisoner-from-nomis-migration-preprod/resources/hmpps-prisoner-from-nomis-transfermovements-sub-queue.tf @@ -0,0 +1,121 @@ +module "prisoner_from_nomis_transfermovements_queue" { + source = "github.com/ministryofjustice/cloud-platform-terraform-sqs?ref=5.1.2" + + # Queue configuration + sqs_name = "prisoner_from_nomis_transfermovements_queue" + encrypt_sqs_kms = "true" + message_retention_seconds = 1209600 + visibility_timeout_seconds = 120 + + redrive_policy = jsonencode({ + deadLetterTargetArn = module.prisoner_from_nomis_transfermovements_dead_letter_queue.sqs_arn + maxReceiveCount = 7 + }) + + # Tags + business_unit = var.business_unit + application = var.application + is_production = var.is_production + team_name = var.team_name # also used for naming the queue + namespace = var.namespace + environment_name = var.environment + infrastructure_support = var.infrastructure_support + + providers = { + aws = aws.london + } +} + +resource "aws_sqs_queue_policy" "prisoner_from_nomis_transfermovements_queue_policy" { + queue_url = module.prisoner_from_nomis_transfermovements_queue.sqs_id + + policy = <