From 2ec1c9ef2551c70b88c371989b07fddb3375057d Mon Sep 17 00:00:00 2001 From: nitrocode <7775707+nitrocode@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:30:57 -0500 Subject: [PATCH 1/2] fix: syntax fixes for prd takeover Signed-off-by: nitrocode <7775707+nitrocode@users.noreply.github.com> --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index 68693a57..0a99d4c6 100644 --- a/main.tf +++ b/main.tf @@ -125,7 +125,7 @@ module "lambda_takeover" { platform = var.platform memory_size = var.memory_size_slack project = var.project - lambda_role_arn = module.takeover_role[*].lambda_role_arn[0] + lambda_role_arn = one(module.takeover_role[*].lambda_role_arn) kms_arn = module.kms.kms_arn sns_topic_arn = module.sns.sns_topic_arn dlq_sns_topic_arn = module.sns_dead_letter_queue.sns_topic_arn @@ -154,7 +154,7 @@ module "lambda_resources" { runtime = var.runtime memory_size = var.memory_size_slack project = var.project - lambda_role_arn = module.resources_role[*].lambda_role_arn[0] + lambda_role_arn = one(module.resources_role[*].lambda_role_arn) kms_arn = module.kms.kms_arn sns_topic_arn = module.sns.sns_topic_arn dlq_sns_topic_arn = module.sns_dead_letter_queue.sns_topic_arn From a99245086df755eb005e81b6811d67150d24d41f Mon Sep 17 00:00:00 2001 From: nitrocode <7775707+nitrocode@users.noreply.github.com> Date: Tue, 17 Sep 2024 14:58:11 -0500 Subject: [PATCH 2/2] chore: add outputs.tf Signed-off-by: nitrocode <7775707+nitrocode@users.noreply.github.com> --- outputs.tf | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 outputs.tf diff --git a/outputs.tf b/outputs.tf new file mode 100644 index 00000000..b8303612 --- /dev/null +++ b/outputs.tf @@ -0,0 +1,144 @@ +output "kms" { + value = module.kms + description = "Outputs of module.kms" +} + +output "lambda_role" { + value = module.lambda_role + description = "Outputs of module.lambda_role" +} + +output "lambda_slack" { + value = module.lambda_slack + description = "Outputs of module.lambda_slack" +} + +output "lambda" { + value = module.lambda + description = "Outputs of module.lambda" +} + +output "lambda_accounts" { + value = module.lambda_accounts + description = "Outputs of module.lambda_accounts" +} + +output "accounts_role" { + value = module.accounts_role + description = "Outputs of module.accounts_role" +} + +output "lambda_scan" { + value = module.lambda_scan + description = "Outputs of module.lambda_scan" +} + +output "lambda_takeover" { + value = local.takeover ? module.lambda_takeover : [] + description = "Outputs of module.lambda_takeover" +} + +output "takeover_role" { + value = local.takeover ? module.takeover_role : [] + description = "Outputs of module.takeover_role" +} + +output "lambda_resources" { + value = local.takeover ? module.lambda_resources : [] + description = "Outputs of module.lambda_resources" +} + +output "resources_role" { + value = local.takeover ? module.resources_role : [] + description = "Outputs of module.resources_role" +} + +output "cloudwatch_event" { + value = module.cloudwatch_event + description = "Outputs of module.cloudwatch_event" +} + +output "resources_event" { + value = local.takeover ? module.resources_event : [] + description = "Outputs of module.resources_event" +} + +output "accounts_event" { + value = module.accounts_event + description = "Outputs of module.accounts_event" +} + +output "sns" { + value = module.sns + description = "Outputs of module.sns" +} + +output "sns_dead_letter_queue" { + value = module.sns_dead_letter_queue + description = "Outputs of module.sns_dead_letter_queue" +} + +output "lambda_cloudflare" { + value = var.cloudflare ? module.lambda_cloudflare : [] + description = "Outputs of module.lambda_cloudflare" +} + +output "cloudflare_event" { + value = var.cloudflare ? module.cloudflare_event : [] + description = "Outputs of module.cloudflare_event" +} + +output "dynamodb" { + value = module.dynamodb + description = "Outputs of module.dynamodb" +} + +output "step_function_role" { + value = module.step_function_role + description = "Outputs of module.step_function_role" +} + +output "step_function" { + value = module.step_function + description = "Outputs of module.step_function" +} + +output "dynamodb_ips" { + value = var.ip_address ? module.dynamodb_ips : [] + description = "Outputs of module.dynamodb_ips" +} + +output "step_function_ips" { + value = var.ip_address ? module.step_function_ips : [] + description = "Outputs of module.step_function_ips" +} + +output "lambda_role_ips" { + value = var.ip_address ? module.lambda_role_ips : [] + description = "Outputs of module.lambda_role_ips" +} + +output "lambda_scan_ips" { + value = var.ip_address ? module.lambda_scan_ips : [] + description = "Outputs of module.lambda_scan_ips" +} + +output "accounts_role_ips" { + value = var.ip_address ? module.accounts_role_ips : [] + description = "Outputs of module.accounts_role_ips" +} + +output "lambda_accounts_ips" { + value = var.ip_address ? module.lambda_accounts_ips : [] + description = "Outputs of module.lambda_accounts_ips" +} + +output "accounts_event_ips" { + value = var.ip_address ? module.accounts_event_ips : [] + description = "Outputs of module.accounts_event_ips" +} + +output "lamdba_stats" { + value = module.lamdba_stats + description = "Outputs of module.lamdba_stats" +}