We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05ab07d commit 2466b6dCopy full SHA for 2466b6d
modules/nat/main.tf
@@ -1,19 +1,19 @@
1
resource "aws_eip" "nat" {
2
vpc = true
3
4
- #count = "${length(var.azs)}" # Comment out count to only have 1 NAT
+ count = "${length(var.azs)}" # Comment out count to only have 1 NAT
5
6
lifecycle {
7
create_before_destroy = true
8
}
9
10
11
resource "aws_nat_gateway" "nat" {
12
13
+
14
allocation_id = "${element(aws_eip.nat.*.id, count.index)}"
15
subnet_id = "${element(split(",", var.public_subnet_ids), count.index)}"
16
- #count = "${length(split(",", var.azs))}" # Comment out count to only have 1 NAT
-
17
18
19
0 commit comments