Created
August 10, 2020 12:14
-
-
Save khushi20218/81061ff2cc9282ed1be869aa5cf10faf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# public subnet | |
resource "aws_subnet" "pub_subnet1" { | |
vpc_id = aws_vpc.tf_vpc.id | |
availability_zone = "ap-south-1a" | |
cidr_block = "192.168.1.0/24" | |
map_public_ip_on_launch = true | |
tags= { | |
Name = "pub-subnet1" | |
} | |
} | |
# private subnet | |
resource "aws_subnet" "pvt_subnet2" { | |
vpc_id = aws_vpc.tf_vpc.id | |
availability_zone = "ap-south-1b" | |
cidr_block = "192.168.2.0/24" | |
map_public_ip_on_launch = false | |
tags= { | |
Name = "pvt-subnet2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment