From 950e770e36869f98b3f251a30f987553335e169c Mon Sep 17 00:00:00 2001 From: Ben Whaley <503816+bwhaley@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:00:30 -0700 Subject: [PATCH] fix env vars --- modules/terraform-aws-alternat/lambda.tf | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/terraform-aws-alternat/lambda.tf b/modules/terraform-aws-alternat/lambda.tf index e5c774a..41432f6 100644 --- a/modules/terraform-aws-alternat/lambda.tf +++ b/modules/terraform-aws-alternat/lambda.tf @@ -27,7 +27,6 @@ resource "aws_lambda_function" "alternat_autoscaling_hook" { environment { variables = merge( local.autoscaling_func_env_vars, - local.has_ipv6_env_var, var.lambda_environment_variables, ) } @@ -152,11 +151,15 @@ resource "aws_lambda_function" "alternat_connectivity_tester" { } environment { - variables = merge({ - ROUTE_TABLE_IDS_CSV = join(",", each.value.route_table_ids), - PUBLIC_SUBNET_ID = each.value.public_subnet_id - CHECK_URLS = join(",", var.connectivity_test_check_urls) - }, var.lambda_environment_variables) + variables = merge( + { + ROUTE_TABLE_IDS_CSV = join(",", each.value.route_table_ids), + PUBLIC_SUBNET_ID = each.value.public_subnet_id + CHECK_URLS = join(",", var.connectivity_test_check_urls) + }, + local.has_ipv6_env_var, + var.lambda_environment_variables, + ) } vpc_config {