Quellcode durchsuchen

tag nat gateway

Chris Mague vor 6 Jahren
Ursprung
Commit
fc0e42fc48
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      private_subnets.tf

+ 2 - 1
private_subnets.tf

@@ -17,6 +17,7 @@ resource "aws_nat_gateway" "private" {
   allocation_id = "${element(aws_eip.private-nat-eip.*.id, count.index)}"
   subnet_id     = "${element(aws_subnet.public.*.id, count.index)}"
   depends_on    = ["aws_internet_gateway.vpc"]
+  tags          = merge({ Name = "${var.vpc-name}-private-${element(var.vpc-azs, count.index)}" }, var.common-tags)
 }
 
 resource "aws_route" "nat_gateway" {
@@ -30,4 +31,4 @@ resource "aws_route_table" "private" {
   count  = "${length(var.vpc-azs)}"
   vpc_id = "${aws_vpc.vpc.id}"
   tags   = merge({ Name = "${var.vpc-name}-private-${element(var.vpc-azs, count.index)}" }, var.common-tags)
-}
+}