Skip to content

Commit b2188ad

Browse files
committed
CCM-13451: Queue policy dependency fix
1 parent 4443c26 commit b2188ad

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

infrastructure/terraform/components/api/event_source_mapping_status_updates_to_handler.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ resource "aws_lambda_event_source_mapping" "status_updates_sqs_to_status_update_
66
scaling_config { maximum_concurrency = 10 }
77

88
depends_on = [
9-
module.letter_status_updates_queue, # ensures queue exists
10-
module.letter_status_update # ensures update handler exists
9+
module.letter_status_updates_queue, # ensures queue exists
10+
module.letter_status_update # ensures update handler exists
1111
]
1212
}

infrastructure/terraform/components/api/locals.tf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ locals {
55
root_domain_nameservers = local.acct.route53_zone_nameservers["supplier-api"]
66

77
openapi_spec = templatefile("${path.module}/resources/spec.tmpl.json", {
8-
APIG_EXECUTION_ROLE_ARN = aws_iam_role.api_gateway_execution_role.arn
9-
AWS_REGION = var.region
10-
AUTHORIZER_LAMBDA_ARN = module.authorizer_lambda.function_arn
11-
GET_LETTER_LAMBDA_ARN = module.get_letter.function_arn
12-
GET_LETTERS_LAMBDA_ARN = module.get_letters.function_arn
13-
GET_LETTER_DATA_LAMBDA_ARN = module.get_letter_data.function_arn
14-
GET_STATUS_LAMBDA_ARN = module.get_status.function_arn
15-
PATCH_LETTER_LAMBDA_ARN = module.patch_letter.function_arn
16-
POST_LETTERS_LAMBDA_ARN = module.post_letters.function_arn
17-
POST_MI_LAMBDA_ARN = module.post_mi.function_arn
8+
APIG_EXECUTION_ROLE_ARN = aws_iam_role.api_gateway_execution_role.arn
9+
AWS_REGION = var.region
10+
AUTHORIZER_LAMBDA_ARN = module.authorizer_lambda.function_arn
11+
GET_LETTER_LAMBDA_ARN = module.get_letter.function_arn
12+
GET_LETTERS_LAMBDA_ARN = module.get_letters.function_arn
13+
GET_LETTER_DATA_LAMBDA_ARN = module.get_letter_data.function_arn
14+
GET_STATUS_LAMBDA_ARN = module.get_status.function_arn
15+
PATCH_LETTER_LAMBDA_ARN = module.patch_letter.function_arn
16+
POST_LETTERS_LAMBDA_ARN = module.post_letters.function_arn
17+
POST_MI_LAMBDA_ARN = module.post_mi.function_arn
1818
})
1919

2020
destination_arn = "arn:aws:logs:${var.region}:${var.shared_infra_account_id}:destination:nhs-main-obs-firehose-logs"
@@ -23,7 +23,7 @@ locals {
2323
LETTERS_TABLE_NAME = aws_dynamodb_table.letters.name,
2424
MI_TABLE_NAME = aws_dynamodb_table.mi.name,
2525
LETTER_TTL_HOURS = 12960, # 18 months * 30 days * 24 hours
26-
MI_TTL_HOURS = 2160 # 90 days * 24 hours
26+
MI_TTL_HOURS = 2160 # 90 days * 24 hours
2727
SUPPLIER_ID_HEADER = "nhsd-supplier-id",
2828
APIM_CORRELATION_HEADER = "nhsd-correlation-id",
2929
DOWNLOAD_URL_TTL_SECONDS = 60

infrastructure/terraform/components/api/module_authorizer_lambda.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module "authorizer_lambda" {
3838
lambda_env_vars = {
3939
CLOUDWATCH_NAMESPACE = "/aws/api-gateway/supplier/alarms",
4040
CLIENT_CERTIFICATE_EXPIRATION_ALERT_DAYS = 14,
41-
APIM_SUPPLIER_ID_HEADER = "NHSD-Supplier-ID",
41+
APIM_SUPPLIER_ID_HEADER = "NHSD-Supplier-ID",
4242
SUPPLIERS_TABLE_NAME = aws_dynamodb_table.suppliers.name
4343
}
4444
}

infrastructure/terraform/components/api/module_lambda_get_letter_data.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ data "aws_iam_policy_document" "get_letter_data_lambda" {
6969
}
7070

7171
statement {
72-
sid = "S3GetObjectForPresign"
73-
actions = [
72+
sid = "S3GetObjectForPresign"
73+
actions = [
7474
"s3:GetObject",
75-
"s3:ListBucket"] # allows 404 response instead of 403 if object missing
75+
"s3:ListBucket"] # allows 404 response instead of 403 if object missing
7676
resources = ["${module.s3bucket_test_letters.arn}/*"]
7777
}
7878
}

infrastructure/terraform/components/api/module_sqs_letter_updates.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module "sqs_letter_updates" {
1212

1313
visibility_timeout_seconds = 60
1414

15-
create_dlq = true
15+
create_dlq = true
1616
sqs_policy_overload = data.aws_iam_policy_document.letter_updates_queue_policy.json
1717
}
1818

0 commit comments

Comments
 (0)