From ea69dbd6775d00bbfece3939f7964f8c57db8fe5 Mon Sep 17 00:00:00 2001 From: NogaNHS Date: Wed, 9 Oct 2024 10:31:06 +0100 Subject: [PATCH] PRMP-935 renaming tf resource --- infrastructure/README.md | 6 ++-- .../lambda-generate-stitch-record.tf | 28 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/infrastructure/README.md b/infrastructure/README.md index 2d18eae1..fabbc4a0 100644 --- a/infrastructure/README.md +++ b/infrastructure/README.md @@ -67,9 +67,9 @@ | [generate-document-manifest-alarm](#module\_generate-document-manifest-alarm) | ./modules/lambda_alarms | n/a | | [generate-document-manifest-alarm-topic](#module\_generate-document-manifest-alarm-topic) | ./modules/sns | n/a | | [generate-document-manifest-lambda](#module\_generate-document-manifest-lambda) | ./modules/lambda | n/a | -| [generate-stitch-record-alarm](#module\_generate-stitch-record-alarm) | ./modules/lambda_alarms | n/a | -| [generate-stitch-record-alarm-topic](#module\_generate-stitch-record-alarm-topic) | ./modules/sns | n/a | -| [generate-stitch-record-lambda](#module\_generate-stitch-record-lambda) | ./modules/lambda | n/a | +| [generate-lloyd-george-stitch-alarm](#module\_generate-lloyd-george-stitch-alarm) | ./modules/lambda_alarms | n/a | +| [generate-lloyd-george-stitch-alarm-topic](#module\_generate-lloyd-george-stitch-alarm-topic) | ./modules/sns | n/a | +| [generate-lloyd-george-stitch-lambda](#module\_generate-lloyd-george-stitch-lambda) | ./modules/lambda | n/a | | [lambda-layer-core](#module\_lambda-layer-core) | ./modules/lambda_layers | n/a | | [lambda-layer-data](#module\_lambda-layer-data) | ./modules/lambda_layers | n/a | | [lloyd-george-stitch-gateway](#module\_lloyd-george-stitch-gateway) | ./modules/gateway | n/a | diff --git a/infrastructure/lambda-generate-stitch-record.tf b/infrastructure/lambda-generate-stitch-record.tf index f66d5347..4a47cbf9 100644 --- a/infrastructure/lambda-generate-stitch-record.tf +++ b/infrastructure/lambda-generate-stitch-record.tf @@ -1,21 +1,21 @@ -module "generate-stitch-record-alarm" { +module "generate-lloyd-george-stitch-alarm" { source = "./modules/lambda_alarms" - lambda_function_name = module.generate-stitch-record-lambda.function_name - lambda_timeout = module.generate-stitch-record-lambda.timeout - lambda_name = "generate_stitch_record_handler" + lambda_function_name = module.generate-lloyd-george-stitch-lambda.function_name + lambda_timeout = module.generate-lloyd-george-stitch-lambda.timeout + lambda_name = "generate_lloyd_george_stitch_handler" namespace = "AWS/Lambda" - alarm_actions = [module.generate-stitch-record-alarm-topic.arn] - ok_actions = [module.generate-stitch-record-alarm-topic.arn] - depends_on = [module.generate-stitch-record-lambda, module.generate-stitch-record-alarm-topic] + alarm_actions = [module.generate-lloyd-george-stitch-alarm-topic.arn] + ok_actions = [module.generate-lloyd-george-stitch-alarm-topic.arn] + depends_on = [module.generate-lloyd-george-stitch-lambda, module.generate-lloyd-george-stitch-alarm-topic] } -module "generate-stitch-record-alarm-topic" { +module "generate-lloyd-george-stitch-alarm-topic" { source = "./modules/sns" sns_encryption_key_id = module.sns_encryption_key.id current_account_id = data.aws_caller_identity.current.account_id - topic_name = "generate-stitch-record-topic" + topic_name = "generate-lloyd-george-stitch-topic" topic_protocol = "lambda" - topic_endpoint = module.generate-stitch-record-lambda.lambda_arn + topic_endpoint = module.generate-lloyd-george-stitch-lambda.lambda_arn delivery_policy = jsonencode({ "Version" : "2012-10-17", "Statement" : [ @@ -37,10 +37,10 @@ module "generate-stitch-record-alarm-topic" { ] }) - depends_on = [module.generate-stitch-record-lambda, module.sns_encryption_key] + depends_on = [module.generate-lloyd-george-stitch-lambda, module.sns_encryption_key] } -module "generate-stitch-record-lambda" { +module "generate-lloyd-george-stitch-lambda" { source = "./modules/lambda" name = "GenerateLloydGeorgeStitch" handler = "handlers.generate_lloyd_george_stitch_handler.lambda_handler" @@ -100,13 +100,13 @@ resource "aws_iam_policy" "dynamodb_stream_stitch_policy" { resource "aws_iam_role_policy_attachment" "policy_generate_stitch_lambda" { count = local.is_sandbox ? 0 : 1 - role = module.generate-stitch-record-lambda.lambda_execution_role_name + role = module.generate-lloyd-george-stitch-lambda.lambda_execution_role_name policy_arn = try(aws_iam_policy.lambda_audit_splunk_sqs_queue_send_policy[0].arn, null) } resource "aws_lambda_event_source_mapping" "dynamodb_stream_stitch" { event_source_arn = module.stitch_metadata_reference_dynamodb_table.dynamodb_stream_arn - function_name = module.generate-stitch-record-lambda.lambda_arn + function_name = module.generate-lloyd-george-stitch-lambda.lambda_arn batch_size = 1 starting_position = "TRIM_HORIZON"