This script creates
- 1 Private VPC
- 1 Public and 1 Private Subnet per avaialability zone
- 1 NAT Gateway
- 1 Internet Gateway
- 1 Elastic IP for the internet gateway
Detailed instructions are available here walkthrough
- Setup variables like project name, region name, availability zones, CIDR etc correctly in terraform.tfvars file.
- Setup your terraform credential using
$ export AWS_ACCESS_KEY_ID="<YOUR_KEY_ID>"
$ export AWS_SECRET_ACCESS_KEY="<YOUR_SECRET>"
- Run Terraform using
terraform init
terraform apply
- To delete created resources
terraform destroy