Amazon web services – How to use `for_each` on a to be created resource in Terraform
I have 3 private and 3 public subnets, and I want to create either 1 or 2 NAT Gateways depending on the environment. So, for dev and staging there should be 1 NAT Gateway, and for production two. Since I…