resource "aws_vpc" "<name your vpc>" {
cidr_block = "10.0.0.0/16"
tags = { (optional)
Name = "<name your vpc>"
}
}
resource “aws_vpc” “prod-vpc” {
cidr_block = “10.0.0.0/16”
enable_dns_support = “true” #gives you an internal domain name
enable_dns_hostnames = “true” #gives you an internal host name
enable_classiclink = “false”
instance_tenancy = “default”
tags {
Name = “prod-vpc”
}
}
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "3.13.0"
}
//network.tf
resource "aws_vpc" "test-env" {
cidr_block = "10.0.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true
tags {
Name = "test-env"
}
}