Skip to content

Commit

Permalink
Fix syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomationD committed Sep 14, 2023
1 parent 2450674 commit 18ea0ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions locals.tf
Original file line number Diff line number Diff line change
@@ -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
}

Expand All @@ -25,7 +25,7 @@ locals {


parameters = merge(
{ ENV = var.env }
{ ENV = var.env },
var.parameters,
local.private_subnets,
local.public_subnets,
Expand Down

0 comments on commit 18ea0ee

Please sign in to comment.