From 977de8ed4a8c1b491154fdc40593735dd61af9f6 Mon Sep 17 00:00:00 2001 From: thanhz Date: Wed, 13 Sep 2023 10:27:57 +0100 Subject: [PATCH] pr comments --- terraform/root_locals.tf | 7 ++++--- terraform/root_main.tf | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/terraform/root_locals.tf b/terraform/root_locals.tf index de32d90..896f834 100644 --- a/terraform/root_locals.tf +++ b/terraform/root_locals.tf @@ -11,7 +11,8 @@ locals { "Role" = "prvt" } ) - dynamodb_hash_key = "v1" - reference_generator_function_name = "${var.project}-reference-generator-${local.hosting_environment}" - reference_counter_table_name = "${var.project}-reference-counter" + dynamodb_hash_key = "v1" + reference_generator_function_name = "${var.project}-reference-generator-${local.hosting_environment}" + reference_generator_api_gateway_name = "${upper(var.project)}ReferenceGenerator${local.hosting_environment}" + reference_counter_table_name = "${var.project}-reference-counter" } diff --git a/terraform/root_main.tf b/terraform/root_main.tf index feea38a..41760c9 100644 --- a/terraform/root_main.tf +++ b/terraform/root_main.tf @@ -57,10 +57,10 @@ module "reference_generator_api_gateway" { source = "./da-terraform-modules/apigateway" api_definition = templatefile("./templates/api_gateway/reference_generator.json.tpl", { environment = local.hosting_environment - title = "${upper(var.project)}ReferenceGenerator" + title = local.reference_generator_api_gateway_name lambda_arn = module.reference_generator_lambda.lambda_arn, }) - api_name = "${upper(var.project)}ReferenceGenerator" + api_name = local.reference_generator_api_gateway_name environment = local.hosting_environment common_tags = local.hosting_common_tags }