Created
October 27, 2017 19:00
-
-
Save mlabouardy/053c180abeda2547c56bd773ff6b3d6d to your computer and use it in GitHub Desktop.
Define 2 Subnets in VPC
This file contains hidden or 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
# Define the public subnet | |
resource "aws_subnet" "public-subnet" { | |
vpc_id = "${aws_vpc.default.id}" | |
cidr_block = "${var.public_subnet_cidr}" | |
availability_zone = "us-east-1a" | |
tags { | |
Name = "Web Public Subnet" | |
} | |
} | |
# Define the private subnet | |
resource "aws_subnet" "private-subnet" { | |
vpc_id = "${aws_vpc.default.id}" | |
cidr_block = "${var.private_subnet_cidr}" | |
availability_zone = "us-east-1b" | |
tags { | |
Name = "Database Private Subnet" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment