4. Reference Resources
#####################
# Create Subnet
#####################
resource "aws_subnet" "subnet-1" {
vpc_id = aws_vpc.first-vpc.id
cidr_block = "10.0.1.0/24"
tags = {
Name = "prod-subnet"
}
}
#####################
# Deploying VPC
#####################
resource "aws_vpc" "first-vpc" {
cidr_block = "10.0.0.0/16"
tags = {
Name = "production"
}
}Last updated