Skip to content

jiantang99/EC2_Environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

EC2_Environment

EC2 Environment with Bastion Host and Private VPC

This environment includes 2 EC2 Ubuntu instances. The first is inside a Public subnet, called "Intern_public_subnet". The purpose of this is to act as a jumphost, to the other instance inside the private subnet, called "Intern_subnet".

The EC2 instance inside the private subnet is able to obtain internet connection via the NAT gateway, which is routed using the route table named "Intern_private_route_table".

This configuration file uses modules and variables to improve the reusability of code blocks.

To launch this environment on your AWS account: Create a file in the same directory as main.tf, called 'terraform.auto.tfvars'. This file is included in gitignore. Type the following: 'AWS_ACCESS_KEY_ID = "" ' 'AWS_SECRET_ACCESS_KEY = "" ' Enter the access keys respectively. Run terraform init. Run terraform plan. Run terraform apply. (Enter 'yes' when prompted)

About

EC2 Environment with Bastion Host and Private VPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages