Skip to content

Commit aaa5abb

Browse files
authored
[PRMP-835] Conditionalize DynamoDB access policies for non-production environments (#504)
1 parent 6444fc1 commit aaa5abb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

infrastructure/lambda-mns-notification.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module "mns-notification-lambda" {
88
module.sqs-mns-notification-queue[0].sqs_write_policy_document,
99
module.lloyd_george_reference_dynamodb_table.dynamodb_write_policy_document,
1010
module.lloyd_george_reference_dynamodb_table.dynamodb_read_policy_document,
11-
module.document_review_dynamodb_table[0].dynamodb_write_policy_document,
12-
module.document_review_dynamodb_table[0].dynamodb_read_policy_document,
11+
local.is_production ? null : module.document_review_dynamodb_table[0].dynamodb_write_policy_document,
12+
local.is_production ? null : module.document_review_dynamodb_table[0].dynamodb_read_policy_document,
1313
aws_iam_policy.ssm_access_policy.policy,
1414
module.ndr-app-config.app_config_policy,
1515
aws_iam_policy.kms_mns_lambda_access[0].policy,
@@ -23,7 +23,7 @@ module "mns-notification-lambda" {
2323
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
2424
WORKSPACE = terraform.workspace
2525
LLOYD_GEORGE_DYNAMODB_NAME = module.lloyd_george_reference_dynamodb_table.table_name
26-
DOCUMENT_REVIEW_DYNAMODB_NAME = local.is_production ? module.document_review_dynamodb_table[0].table_name : ""
26+
DOCUMENT_REVIEW_DYNAMODB_NAME = local.is_production ? "" : module.document_review_dynamodb_table[0].table_name
2727
MNS_NOTIFICATION_QUEUE_URL = module.sqs-mns-notification-queue[0].sqs_url
2828
PDS_FHIR_IS_STUBBED = local.is_sandbox
2929
}

0 commit comments

Comments
 (0)