Skip to content

Commit 369cb8e

Browse files
committed
Addressed TF review comments
1 parent 21b0bf5 commit 369cb8e

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

infrastructure/terraform/components/api/iam_role_api_gateway_execution_role.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ data "aws_iam_policy_document" "api_gateway_execution_policy" {
5050
resources = [
5151
module.authorizer_lambda.function_arn,
5252
module.get_letter.function_arn,
53+
module.get_letter_data.function_arn,
5354
module.get_letters.function_arn,
5455
module.patch_letter.function_arn,
55-
module.get_letter_data.function_arn,
5656
module.post_mi.function_arn
5757
]
5858
}

infrastructure/terraform/components/api/locals.tf

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ 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
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
1313
GET_LETTER_DATA_LAMBDA_ARN = module.get_letter_data.function_arn
14-
PATCH_LETTER_LAMBDA_ARN = module.patch_letter.function_arn
15-
POST_MI_LAMBDA_ARN = module.post_mi.function_arn
14+
PATCH_LETTER_LAMBDA_ARN = module.patch_letter.function_arn
15+
POST_MI_LAMBDA_ARN = module.post_mi.function_arn
1616
})
1717

1818
destination_arn = "arn:aws:logs:${var.region}:${var.shared_infra_account_id}:destination:nhs-main-obs-firehose-logs"
1919

2020
common_lambda_env_vars = {
21-
LETTERS_TABLE_NAME = aws_dynamodb_table.letters.name,
22-
MI_TABLE_NAME = aws_dynamodb_table.mi.name,
23-
LETTER_TTL_HOURS = 12960, # 18 months * 30 days * 24 hours
24-
MI_TTL_HOURS = 2160 # 90 days * 24 hours
25-
SUPPLIER_ID_HEADER = "nhsd-supplier-id",
26-
APIM_CORRELATION_HEADER = "nhsd-correlation-id",
21+
LETTERS_TABLE_NAME = aws_dynamodb_table.letters.name,
22+
MI_TABLE_NAME = aws_dynamodb_table.mi.name,
23+
LETTER_TTL_HOURS = 12960, # 18 months * 30 days * 24 hours
24+
MI_TTL_HOURS = 2160 # 90 days * 24 hours
25+
SUPPLIER_ID_HEADER = "nhsd-supplier-id",
26+
APIM_CORRELATION_HEADER = "nhsd-correlation-id",
2727
DOWNLOAD_URL_TTL_SECONDS = 60
2828
}
2929
}

0 commit comments

Comments
 (0)