added outputs vars

This commit is contained in:
UdhavPawar 2021-09-16 14:15:05 -07:00
parent b6e221fe77
commit 6e6942507e
4 changed files with 8 additions and 3 deletions

View file

@ -1,4 +1,4 @@
resource "aws_internet_gateway" "demo_gw" {
resource "aws_internet_gateway" "demo_igw" {
vpc_id = var.demo_vpc_id
tags {

View file

@ -0,0 +1,3 @@
output "demo_igw_id" {
value = "${aws_internet_gateway.demo_igw.id}"
}

View file

@ -7,8 +7,7 @@ resource "aws_eip" "demo_gw_eip" {
}
// Create a NAT GW in public1 and public2 subnets
resource "aws_nat_gateway" "ease_prod_vpc_nat_gws" {
count = length(var.ease_prod_vpc_public_subnets)
resource "aws_nat_gateway" "demo_natgw" {
allocation_id = aws_eip.demo_gw_eip.id
# feed coreos_subnet public subnet ID
subnet_id = var.coreos_subnet_id

View file

@ -0,0 +1,3 @@
output "demo_natgw_id" {
value = "${aws_nat_gateway.demo_natgw.id}"
}