This is the terraform script which will create a vpc on the AWS INFRA. It includes creation of the VPC, Subnet, Internet gateway, NAT gateway and rest of the components will be added as part of the VPC in AWS.
In this script, in the end it will create customer route table in this VPC that will be associated with the subnet. You can also associate the route table with internet gateway or virtual private gateway.