diff --git a/locals.tf b/locals.tf index ec23f58..286278b 100644 --- a/locals.tf +++ b/locals.tf @@ -1,19 +1,19 @@ locals { private_subnets = var.serialize_lists ? { private_subnets = var.join_lists ? join(",", var.private_subnets) : jsonencode(var.private_subnets) - } : length(var.private_subnets) > 1 ? {for k, v in var.private_subnets : "private_subnet_${k + 1}" => v} : { + } : length(var.private_subnets) > 1 ? { for k, v in var.private_subnets : "private_subnet_${k + 1}" => v } : { for k, v in var.private_subnets : "private_subnet" => v } public_subnets = var.serialize_lists ? { public_subnets = var.join_lists ? join(",", var.public_subnets) : jsonencode(var.public_subnets) - } : length(var.public_subnets) > 1 ? {for k, v in var.public_subnets : "public_subnet_${k + 1}" => v} : { + } : length(var.public_subnets) > 1 ? { for k, v in var.public_subnets : "public_subnet_${k + 1}" => v } : { for k, v in var.public_subnets : "public_subnet" => v } security_groups = var.serialize_lists ? { security_groups = var.join_lists ? join(",", var.security_groups) : jsonencode(var.security_groups) - } : length(var.security_groups) > 1 ? {for k, v in var.security_groups : "security_group_${k + 1}" => v} : { + } : length(var.security_groups) > 1 ? { for k, v in var.security_groups : "security_group_${k + 1}" => v } : { for k, v in var.security_groups : "security_group" => v } @@ -25,7 +25,7 @@ locals { parameters = merge( - { ENV = var.env } + { ENV = var.env }, var.parameters, local.private_subnets, local.public_subnets,