Skip to content

Commit e6ea9cd

Browse files
committed
[PRM-918] Remove redundant app config policy references from Lambda configurations
Signed-off-by: NogaNHS <127490765+NogaNHS@users.noreply.github.com>
1 parent 2d99b47 commit e6ea9cd

46 files changed

Lines changed: 15 additions & 190 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

infrastructure/lambda-access-audit.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ module "access-audit-lambda" {
5757
name = "AccessAuditLambda"
5858
handler = "handlers.access_audit_handler.lambda_handler"
5959
iam_role_policy_documents = [
60-
module.ndr-app-config.app_config_policy,
6160
module.auth_session_dynamodb_table.dynamodb_write_policy_document,
6261
module.auth_session_dynamodb_table.dynamodb_read_policy_document,
6362
module.access_audit_dynamodb_table.dynamodb_write_policy_document
@@ -69,9 +68,6 @@ module "access-audit-lambda" {
6968

7069
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
7170
lambda_environment_variables = {
72-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
73-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
74-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
7571
WORKSPACE = terraform.workspace
7672
AUTH_SESSION_TABLE_NAME = "${terraform.workspace}_${var.auth_session_dynamodb_table_name}"
7773
ACCESS_AUDIT_TABLE_NAME = "${terraform.workspace}_${var.access_audit_dynamodb_table_name}"

infrastructure/lambda-authoriser.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@ module "authoriser-lambda" {
66
aws_iam_policy.ssm_access_policy_authoriser.policy,
77
module.auth_session_dynamodb_table.dynamodb_read_policy_document,
88
module.auth_session_dynamodb_table.dynamodb_write_policy_document,
9-
module.ndr-app-config.app_config_policy
109
]
1110
kms_deletion_window = var.kms_deletion_window
1211
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
1312
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
1413
lambda_environment_variables = {
15-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
16-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
17-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
1814
WORKSPACE = terraform.workspace
1915
SSM_PARAM_JWT_TOKEN_PUBLIC_KEY = "jwt_token_public_key"
2016
AUTH_SESSION_TABLE_NAME = "${terraform.workspace}_${var.auth_session_dynamodb_table_name}"

infrastructure/lambda-bulk-upload-metadata-preprocessor.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,12 @@ module "bulk_upload_metadata_preprocessor_lambda" {
66
iam_role_policy_documents = [
77
module.ndr-bulk-staging-store.s3_read_policy_document,
88
module.ndr-bulk-staging-store.s3_write_policy_document,
9-
module.ndr-app-config.app_config_policy
109
]
1110
kms_deletion_window = var.kms_deletion_window
1211
rest_api_id = null
1312
api_execution_arn = null
1413

1514
lambda_environment_variables = {
16-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
17-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
18-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
1915
WORKSPACE = terraform.workspace
2016
STAGING_STORE_BUCKET_NAME = "${terraform.workspace}-${var.staging_store_bucket_name}"
2117
}

infrastructure/lambda-bulk-upload-metadata-processor.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ module "bulk-upload-metadata-processor-lambda" {
1414
module.lg-bulk-upload-expedite-metadata-queue.sqs_read_policy_document,
1515
module.lg-bulk-upload-expedite-metadata-queue.sqs_write_policy_document,
1616
module.document_review_queue.sqs_write_policy_document,
17-
module.ndr-app-config.app_config_policy,
1817
aws_iam_policy.ssm_access_policy.policy,
1918
data.aws_iam_policy.aws_lambda_vpc_access_execution_role.policy,
2019
]
2120

2221
lambda_environment_variables = {
23-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
24-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
25-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
2622
WORKSPACE = terraform.workspace
2723
STAGING_STORE_BUCKET_NAME = "${terraform.workspace}-${var.staging_store_bucket_name}"
2824
BULK_UPLOAD_DYNAMODB_NAME = "${terraform.workspace}_${var.bulk_upload_report_dynamodb_table_name}"

infrastructure/lambda-bulk-upload-metadata.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,13 @@ module "bulk-upload-metadata-lambda" {
88
module.ndr-bulk-staging-store.s3_write_policy_document,
99
module.sqs-lg-bulk-upload-metadata-queue.sqs_read_policy_document,
1010
module.sqs-lg-bulk-upload-metadata-queue.sqs_write_policy_document,
11-
module.ndr-app-config.app_config_policy
1211
]
1312

1413
kms_deletion_window = var.kms_deletion_window
1514
rest_api_id = null
1615
api_execution_arn = null
1716

1817
lambda_environment_variables = {
19-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
20-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
21-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
2218
WORKSPACE = terraform.workspace
2319
STAGING_STORE_BUCKET_NAME = "${terraform.workspace}-${var.staging_store_bucket_name}"
2420
METADATA_SQS_QUEUE_URL = module.sqs-lg-bulk-upload-metadata-queue.sqs_url

infrastructure/lambda-bulk-upload-report.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,12 @@ module "bulk-upload-report-lambda" {
99
module.bulk_upload_report_dynamodb_table.dynamodb_read_policy_document,
1010
module.bulk_upload_report_dynamodb_table.dynamodb_write_policy_document,
1111
aws_iam_policy.dynamodb_policy_scan_bulk_report.policy,
12-
module.ndr-app-config.app_config_policy
1312
]
1413
kms_deletion_window = var.kms_deletion_window
1514
rest_api_id = null
1615
api_execution_arn = null
1716

1817
lambda_environment_variables = {
19-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
20-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
21-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
2218
WORKSPACE = terraform.workspace
2319
STATISTICAL_REPORTS_BUCKET = "${terraform.workspace}-${var.statistical_reports_bucket_name}"
2420
BULK_UPLOAD_DYNAMODB_NAME = "${terraform.workspace}_${var.bulk_upload_report_dynamodb_table_name}"

infrastructure/lambda-bulk-upload.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,12 @@ module "bulk-upload-lambda" {
1919
module.lg-bulk-upload-expedite-metadata-queue.sqs_read_policy_document,
2020
module.document_review_queue.sqs_write_policy_document,
2121
aws_iam_policy.ssm_access_policy.policy,
22-
module.ndr-app-config.app_config_policy
2322
]
2423
kms_deletion_window = var.kms_deletion_window
2524
rest_api_id = null
2625
api_execution_arn = null
2726

2827
lambda_environment_variables = {
29-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
30-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
31-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
3228
WORKSPACE = terraform.workspace
3329
STAGING_STORE_BUCKET_NAME = "${terraform.workspace}-${var.staging_store_bucket_name}"
3430
LLOYD_GEORGE_BUCKET_NAME = "${terraform.workspace}-${var.lloyd_george_bucket_name}"

infrastructure/lambda-create-doc-ref.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ module "create-doc-ref-lambda" {
5858
module.lloyd_george_reference_dynamodb_table.dynamodb_write_policy_document,
5959
module.lloyd_george_reference_dynamodb_table.dynamodb_read_policy_document,
6060
aws_iam_policy.ssm_access_policy.policy,
61-
module.ndr-app-config.app_config_policy,
6261
]
6362
kms_deletion_window = var.kms_deletion_window
6463
rest_api_id = aws_api_gateway_rest_api.ndr_doc_store_api.id
@@ -68,9 +67,6 @@ module "create-doc-ref-lambda" {
6867
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
6968
lambda_environment_variables = {
7069
STAGING_STORE_BUCKET_NAME = "${terraform.workspace}-${var.staging_store_bucket_name}"
71-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
72-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
73-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
7470
DOCUMENT_STORE_BUCKET_NAME = "${terraform.workspace}-${var.docstore_bucket_name}"
7571
DOCUMENT_STORE_DYNAMODB_NAME = "${terraform.workspace}_${var.docstore_dynamodb_table_name}"
7672
LLOYD_GEORGE_DYNAMODB_NAME = "${terraform.workspace}_${var.lloyd_george_dynamodb_table_name}"

infrastructure/lambda-data-collection.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ module "data-collection-lambda" {
4848
lambda_ephemeral_storage = local.is_production ? 10240 : 1769
4949
memory_size = local.is_production ? 10240 : 1769
5050
iam_role_policy_documents = [
51-
module.ndr-app-config.app_config_policy,
5251
module.statistics_dynamodb_table.dynamodb_read_policy_document,
5352
module.statistics_dynamodb_table.dynamodb_write_policy_document,
5453
module.ndr-lloyd-george-store.s3_read_policy_document,
@@ -66,9 +65,6 @@ module "data-collection-lambda" {
6665
api_execution_arn = null
6766

6867
lambda_environment_variables = {
69-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
70-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
71-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
7268
LLOYD_GEORGE_BUCKET_NAME = "${terraform.workspace}-${var.lloyd_george_bucket_name}"
7369
LLOYD_GEORGE_DYNAMODB_NAME = "${terraform.workspace}_${var.lloyd_george_dynamodb_table_name}"
7470
DOCUMENT_STORE_BUCKET_NAME = "${terraform.workspace}-${var.docstore_bucket_name}"

infrastructure/lambda-delete-doc-object.tf

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,13 @@ module "delete-document-object-lambda" {
5151
module.lloyd_george_reference_dynamodb_table.dynamodb_write_policy_document,
5252
module.ndr-lloyd-george-store.s3_read_policy_document,
5353
module.ndr-lloyd-george-store.s3_write_policy_document,
54-
module.ndr-app-config.app_config_policy,
5554
aws_iam_policy.dynamodb_stream_delete_object_policy.policy
5655
]
5756
kms_deletion_window = var.kms_deletion_window
5857
rest_api_id = null
5958
api_execution_arn = null
6059
lambda_environment_variables = {
61-
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
62-
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
63-
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
64-
WORKSPACE = terraform.workspace
60+
WORKSPACE = terraform.workspace
6561
}
6662
is_gateway_integration_needed = false
6763
is_invoked_from_gateway = false

0 commit comments

Comments
 (0)