Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
/ terraform-tutorial Public archive

These are my notes that I took while learning the tool "Terraform".

Notifications You must be signed in to change notification settings

cjxe/terraform-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

A terraform file that creates a VPC and initialises a public subnet in it.

project architecture

Installation

The build has been tested with Terraform v1.4.5.

Steps:

  1. Install Terraform
  2. Expose your AWS "access key id" and "secret access key" to the current terminal session with:
export AWS_ACCESS_KEY_ID=yourAccessKeyId
export AWS_SECRET_ACCESS_KEY=yourSecretAccessKey
  1. Initialise Terraform with:
terraform init
  1. Preview the changes that Terraform plans to make to your infrastructure with:
terraform plan
  1. Apply the changes with:
terraform apply
  1. Create a .pem key with the name main-key using the AWS Management Console > EC2 > Network & Security > Key Pairs. This key name is associated in the Terraform file while initialising the EC2 instance.
  2. SSH to the server
ssh -i "main-key.pem" ubuntu@public.ip.goes.here
  1. Destory the AWS infrastructure with:
terraform destroy

Notes

  1. What is Internet Gateway?
  2. Why did we define a custom routing table?
  3. Why do we use elastic IPs?

About

These are my notes that I took while learning the tool "Terraform".

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages