Skip to content

ilhaan/terraform-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

terraform-test

Ilhaan plays around with Terraform. Followed getting started guide here.

Instructions below are outdated. Update coming soon!

This repo can be used to spin up an EC2 instance that only allows SSH inbound connections via port 22 and all outbound connections.

Instructions

This repo assumes that AWS configuration and credential files are managed by awscli based on this.

Once your AWS credentials are set up, follow the instructions below:

  1. Clone this repo and cd into the ec2_instance directory. Create terraform.tfvars in this directory and add the following line:
keypair_name="<keypair-name-without-extension>"

The keypair above can be stored in ~/.ssh/.

  1. Run terraform apply to deploy instance
  2. Once the instance is deployed, the instance's public DNS will be output to the terminal, which can be used to gain SSH access to the instance.
  3. To spin down the instance, run terraform destroy

Reference

About

Ilhaan plays around with Terraform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages