diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index 691c9996..728292ed 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -3,7 +3,9 @@ name: Deploy infrastructure on: push: branches: - - "**" + - "main" + - "dev" + - "prod" paths: - 'infrastructure/terraform/**' - '.github/workflows/deploy_terraform.yml' diff --git a/infrastructure/terraform/lambda/address2UPRN/main.tf b/infrastructure/terraform/lambda/address2UPRN/main.tf index 5a36153e..f53d55c8 100644 --- a/infrastructure/terraform/lambda/address2UPRN/main.tf +++ b/infrastructure/terraform/lambda/address2UPRN/main.tf @@ -22,6 +22,8 @@ module "address2uprn" { image_uri = local.image_uri + timeout = 900 + environment = merge( { STAGE = var.stage diff --git a/infrastructure/terraform/modules/sqs_queue/main.tf b/infrastructure/terraform/modules/sqs_queue/main.tf index 580e67bd..afb7dc27 100644 --- a/infrastructure/terraform/modules/sqs_queue/main.tf +++ b/infrastructure/terraform/modules/sqs_queue/main.tf @@ -5,7 +5,7 @@ resource "aws_sqs_queue" "dlq" { resource "aws_sqs_queue" "this" { name = var.name - visibility_timeout_seconds = 120 + visibility_timeout_seconds = 1000 redrive_policy = jsonencode({ deadLetterTargetArn = aws_sqs_queue.dlq.arn diff --git a/infrastructure/terraform/modules/sqs_queue/variables.tf b/infrastructure/terraform/modules/sqs_queue/variables.tf index 943a7a16..95b33231 100644 --- a/infrastructure/terraform/modules/sqs_queue/variables.tf +++ b/infrastructure/terraform/modules/sqs_queue/variables.tf @@ -2,5 +2,5 @@ variable "name" { type = string } variable "max_receive_count" { type = number - default = 5 + default = 1 }