Skip to content

Commit 300922d

Browse files
[NDR-193] removing splunk (#385)
Co-authored-by: Sam Whyte <[email protected]> Co-authored-by: robg-nhs <[email protected]>
1 parent 417d472 commit 300922d

12 files changed

+46
-177
lines changed

infrastructure/README.md

Lines changed: 41 additions & 48 deletions
Large diffs are not rendered by default.

infrastructure/audit.tf

Lines changed: 0 additions & 62 deletions
This file was deleted.

infrastructure/lambda-document-manifest-job.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,24 +79,16 @@ module "document-manifest-job-lambda" {
7979
LLOYD_GEORGE_DYNAMODB_NAME = "${terraform.workspace}_${var.lloyd_george_dynamodb_table_name}"
8080
ZIPPED_STORE_BUCKET_NAME = "${terraform.workspace}-${var.zip_store_bucket_name}"
8181
ZIPPED_STORE_DYNAMODB_NAME = "${terraform.workspace}_${var.zip_store_dynamodb_table_name}"
82-
SPLUNK_SQS_QUEUE_URL = try(module.sqs-splunk-queue[0].sqs_url, null)
8382
WORKSPACE = terraform.workspace
8483
PRESIGNED_ASSUME_ROLE = aws_iam_role.manifest_presign_url_role.arn
8584
}
8685
depends_on = [
8786
aws_api_gateway_rest_api.ndr_doc_store_api,
8887
module.document-manifest-job-gateway,
89-
aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0],
9088
module.ndr-app-config,
9189
module.lloyd_george_reference_dynamodb_table,
9290
module.document_reference_dynamodb_table,
9391
module.zip_store_reference_dynamodb_table,
9492
module.ndr-zip-request-store
9593
]
9694
}
97-
98-
resource "aws_iam_role_policy_attachment" "policy_manifest_lambda" {
99-
count = local.is_sandbox ? 0 : 1
100-
role = module.document-manifest-job-lambda.lambda_execution_role_name
101-
policy_arn = try(aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0].arn, null)
102-
}

infrastructure/lambda-feature-flags.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ module "feature-flags-lambda" {
7676
depends_on = [
7777
aws_api_gateway_rest_api.ndr_doc_store_api,
7878
module.feature-flags-gateway,
79-
aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0],
8079
module.ndr-app-config
8180
]
8281
}

infrastructure/lambda-generate-document-manifest.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,13 @@ module "generate-document-manifest-lambda" {
6666
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
6767
ZIPPED_STORE_BUCKET_NAME = "${terraform.workspace}-${var.zip_store_bucket_name}"
6868
ZIPPED_STORE_DYNAMODB_NAME = "${terraform.workspace}_${var.zip_store_dynamodb_table_name}"
69-
SPLUNK_SQS_QUEUE_URL = try(module.sqs-splunk-queue[0].sqs_url, null)
7069
WORKSPACE = terraform.workspace
7170
PRESIGNED_ASSUME_ROLE = aws_iam_role.manifest_presign_url_role.arn
7271
}
7372
is_gateway_integration_needed = false
7473
is_invoked_from_gateway = false
7574

7675
depends_on = [
77-
aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0],
7876
module.ndr-app-config,
7977
module.zip_store_reference_dynamodb_table,
8078
module.ndr-zip-request-store,
@@ -99,12 +97,6 @@ resource "aws_iam_policy" "dynamodb_stream_manifest" {
9997
})
10098
}
10199

102-
resource "aws_iam_role_policy_attachment" "policy_generate_manifest_lambda" {
103-
count = local.is_sandbox ? 0 : 1
104-
role = module.generate-document-manifest-lambda.lambda_execution_role_name
105-
policy_arn = try(aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0].arn, null)
106-
}
107-
108100
resource "aws_lambda_event_source_mapping" "dynamodb_stream_manifest" {
109101
event_source_arn = module.zip_store_reference_dynamodb_table.dynamodb_stream_arn
110102
function_name = module.generate-document-manifest-lambda.lambda_arn

infrastructure/lambda-generate-stitch-record.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ module "generate-lloyd-george-stitch-lambda" {
6464
APPCONFIG_APPLICATION = module.ndr-app-config.app_config_application_id
6565
APPCONFIG_ENVIRONMENT = module.ndr-app-config.app_config_environment_id
6666
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
67-
SPLUNK_SQS_QUEUE_URL = try(module.sqs-splunk-queue[0].sqs_url, null)
6867
STITCH_METADATA_DYNAMODB_NAME = "${terraform.workspace}_${var.stitch_metadata_dynamodb_table_name}"
6968
WORKSPACE = terraform.workspace
7069
PRESIGNED_ASSUME_ROLE = aws_iam_role.stitch_presign_url_role.arn
@@ -75,7 +74,6 @@ module "generate-lloyd-george-stitch-lambda" {
7574
is_invoked_from_gateway = false
7675

7776
depends_on = [
78-
aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0],
7977
module.ndr-app-config,
8078
module.ndr-document-store,
8179
module.ndr-lloyd-george-store,
@@ -99,12 +97,6 @@ resource "aws_iam_policy" "dynamodb_stream_stitch_policy" {
9997
})
10098
}
10199

102-
resource "aws_iam_role_policy_attachment" "policy_generate_stitch_lambda" {
103-
count = local.is_sandbox ? 0 : 1
104-
role = module.generate-lloyd-george-stitch-lambda.lambda_execution_role_name
105-
policy_arn = try(aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0].arn, null)
106-
}
107-
108100
resource "aws_lambda_event_source_mapping" "dynamodb_stream_stitch" {
109101
event_source_arn = module.stitch_metadata_reference_dynamodb_table.dynamodb_stream_arn
110102
function_name = module.generate-lloyd-george-stitch-lambda.lambda_arn

infrastructure/lambda-get-report-by-ods.tf

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,6 @@ module "get-report-by-ods-lambda" {
7676
}
7777
depends_on = [
7878
aws_api_gateway_rest_api.ndr_doc_store_api,
79-
module.get-report-by-ods-gateway,
80-
aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0]
79+
module.get-report-by-ods-gateway
8180
]
8281
}
83-
84-
resource "aws_iam_role_policy_attachment" "policy_audit_get-report-by-ods-lambda" {
85-
count = local.is_sandbox ? 0 : 1
86-
role = module.get-report-by-ods-lambda.lambda_execution_role_name
87-
policy_arn = try(aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0].arn, null)
88-
}

infrastructure/lambda-lloyd-george-record-stitch.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ module "lloyd-george-stitch-lambda" {
7878
LLOYD_GEORGE_DYNAMODB_NAME = "${terraform.workspace}_${var.lloyd_george_dynamodb_table_name}"
7979
STITCH_METADATA_DYNAMODB_NAME = "${terraform.workspace}_${var.stitch_metadata_dynamodb_table_name}"
8080
CLOUDFRONT_URL = module.cloudfront-distribution-lg.cloudfront_url
81-
SPLUNK_SQS_QUEUE_URL = try(module.sqs-splunk-queue[0].sqs_url, null)
8281
WORKSPACE = terraform.workspace
8382
PRESIGNED_ASSUME_ROLE = aws_iam_role.stitch_presign_url_role.arn
8483
EDGE_REFERENCE_TABLE = module.cloudfront_edge_dynamodb_table.table_name
@@ -87,16 +86,9 @@ module "lloyd-george-stitch-lambda" {
8786
aws_api_gateway_rest_api.ndr_doc_store_api,
8887
module.ndr-lloyd-george-store,
8988
module.lloyd-george-stitch-gateway,
90-
aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0],
9189
module.ndr-app-config,
9290
module.cloudfront-distribution-lg,
9391
module.stitch_metadata_reference_dynamodb_table,
9492
module.lloyd_george_reference_dynamodb_table
9593
]
9694
}
97-
98-
resource "aws_iam_role_policy_attachment" "lambda_stitch-lambda" {
99-
count = local.is_sandbox ? 0 : 1
100-
role = module.lloyd-george-stitch-lambda.lambda_execution_role_name
101-
policy_arn = try(aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0].arn, null)
102-
}

infrastructure/lambda-search-patient.tf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,13 @@ module "search-patient-details-lambda" {
7070
APPCONFIG_CONFIGURATION = module.ndr-app-config.app_config_configuration_profile_id
7171
SSM_PARAM_JWT_TOKEN_PUBLIC_KEY = "jwt_token_public_key"
7272
PDS_FHIR_IS_STUBBED = local.is_sandbox,
73-
SPLUNK_SQS_QUEUE_URL = try(module.sqs-splunk-queue[0].sqs_url, null)
7473
WORKSPACE = terraform.workspace
7574
AUTH_SESSION_TABLE_NAME = "${terraform.workspace}_${var.auth_session_dynamodb_table_name}"
7675
}
7776
api_execution_arn = aws_api_gateway_rest_api.ndr_doc_store_api.execution_arn
7877
depends_on = [
7978
aws_api_gateway_rest_api.ndr_doc_store_api,
8079
module.search-patient-details-gateway,
81-
aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0],
8280
module.ndr-app-config
8381
]
8482
}
85-
86-
resource "aws_iam_role_policy_attachment" "policy_audit_search-patient-details-lambda" {
87-
count = local.is_sandbox ? 0 : 1
88-
role = module.search-patient-details-lambda.lambda_execution_role_name
89-
policy_arn = try(aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0].arn, null)
90-
}

infrastructure/lambda-token.tf

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,13 @@ module "create-token-lambda" {
3636
AUTH_STATE_TABLE_NAME = "${terraform.workspace}_${var.auth_state_dynamodb_table_name}"
3737
AUTH_SESSION_TABLE_NAME = "${terraform.workspace}_${var.auth_session_dynamodb_table_name}"
3838
ENVIRONMENT = var.environment
39-
SPLUNK_SQS_QUEUE_URL = try(module.sqs-splunk-queue[0].sqs_url, null)
4039
}
4140
depends_on = [
4241
aws_api_gateway_rest_api.ndr_doc_store_api,
4342
aws_iam_policy.ssm_access_policy,
4443
module.auth_session_dynamodb_table,
4544
module.auth_state_dynamodb_table,
4645
module.create-token-gateway,
47-
aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0],
4846
module.ndr-app-config
4947
]
5048
memory_size = 1769
@@ -91,10 +89,3 @@ module "create_token-alarm_topic" {
9189

9290
depends_on = [module.create-token-lambda, module.sns_encryption_key]
9391
}
94-
95-
96-
resource "aws_iam_role_policy_attachment" "policy_audit_token_lambda" {
97-
count = local.is_sandbox ? 0 : 1
98-
role = module.create-token-lambda.lambda_execution_role_name
99-
policy_arn = try(aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0].arn, null)
100-
}

0 commit comments

Comments
 (0)