Create VPC AWS (Public Subnet and Private Subnet)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
default
.gitignore
README.md

README.md

Creating a VPC with Nat Gateway AWS

Project clone

$ git clone https://github.com/vandocouto/terraform-aws-vpc.git

Accessing the project

$ cd terraform-aws-vpc/

Create script deploy.sh

$ vim deploy.sh
#!/usr/bin/env bash
if [ -z "$1" ]
then
  echo "Usage: must pass the terraform directory"
  exit 1
fi

# Access Key and Secret Key Report
export AWS_ACCESS_KEY_ID=""
export AWS_SECRET_ACCESS_KEY=""
# Configure region
export AWS_DEFAULT_REGION=""

cd $1
terraform $2
Set permission
$ chmod +x deploy.sh

Configure the variable file

Adjust the variable file
$ vim terraform/default/variables.tf

Deploy

Step 1 - After tuning, run the command below

 ./deploy.sh default plan
 

Step 2 - Building the Infrastructure

 ./deploy.sh default apply
 

Destroy project

 ./deploy.sh default destroy