A terraform Module to create a VPC in an AWS-Account
List of input variables (also check variables.tf)
namename of the VPCcidrCIDR of the VPCpublic_subnetsA list of public subnets inside the VPC.private_subnetsA list of private subnets inside the VPC.azsA list of Availability zones in the regionenable_dns_hostnamesshould be true if you want to use private DNS within the VPCenable_dns_supportshould be true if you want to use private DNS within the VPCmap_public_ip_on_launchshould be false if you do not want to auto-assign public IP on launchprivate_propagating_vgwsA list of VGWs the private route table should propagatepublic_propagating_vgwsA list of VGWs the public route table should propagate.tagsA map of tags to add to all resources.
public_subnetsA list with public subnet IDsprivate_subnetsA list with private subnet IDsvpc_idID of the VPCpublic_route_table_idsThe ID of the public route tableprivate_route_table_idsThe ID of the private route tabledefault_security_group_idThe ID of the default security groupigw_idID of the internet gateway
module "vpc" {
source = "git::ssh://[email protected]/solutionDrive/terraform-aws-vpc.git"
name = "my_vpc"
cidr = "10.200.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true
public_subnets = ["10.200.101.0/24"]
private_subnets = ["10.200.100.0/24"]
azs = ["eu-central-1a"]
tags = {
"Terraform" = "true"
"Environment" = "prod"
}
}