Skip to content

Terraform code that creates the entire network structure on AWS with public and private subnets

Notifications You must be signed in to change notification settings

gabriel8fm/aws-vpc-with-nat-instance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VPC with NAT instance

The general purpose of this project is to create a new VPC with a NAT instance. The following modules were used to create this environment:

  • EC2
  • VPC

Directory structure

Directory structure

Modules

  • VPC

This module is responsible to create all VPC configuration, including NAT using an EC2 instance.

  • main.tf

Root configuration responsible for linking other modules and also has the provider settings.

Terraform Init

First of all, you need to configure your AWS credentials inside this file /home/USERNAME/.aws/credentials. Then run:

terraform init

This command will download the module's dependencies.

Terraform Plan

We can validate changes that will be applied on our AWS account with the below command:

terraform plan

Terraform Apply

Finally, we can apply the changes in running this:

terraform apply

Terraform Destroy

If you were not satisfied with this configuration, just remove all the things with this:

terraform destroy

References

Learn about Terraform

About

Terraform code that creates the entire network structure on AWS with public and private subnets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages