Skip to content

Commit

Permalink
Merge pull request #6 from pierrecarre/master
Browse files Browse the repository at this point in the history
Add a condition to build SNAT rules only when a NAT GW is requested
  • Loading branch information
vlandemaine-orange authored Oct 29, 2021
2 parents 1480768 + dcac70d commit fef9c25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ locals {
vpc_subnets_map = zipmap(local.vpc_subnets_keys, local.vpc_subnets_values)

vpc_subnets_snat_cidr = flatten([for name in var.vpc_snat_subnets : [for subnet in var.vpc_subnets : subnet.subnet_cidr if subnet.subnet_name == name]])
vpc_subnets_snat_cidr_map = zipmap(local.vpc_subnets_snat_cidr, local.vpc_subnets_snat_cidr)
vpc_subnets_snat_cidr_map = var.enable_nat_gateway ? zipmap(local.vpc_subnets_snat_cidr, local.vpc_subnets_snat_cidr) : {}

}

Expand Down

0 comments on commit fef9c25

Please sign in to comment.