Skip to content

shahadarsh/hashicorp-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HashiCorp Workshop

Exercises for Hashicorp Workshop

Prerequisites

Create AWS account

All exercises require an AWS account so create an account if you don't have it

Create IAM user

  1. Go to your AWS console & create IAM user by following instructions here
  2. Create a user with name "usr_hashicorp" with Programmatic access & in Admin group
  3. Save "Access key ID" & "Secret access key" somewhere locally

Install AWS CLI

Install AWS CLI following instructions here

Workshop Steps

Configure AWS CLI with a profile

Configure AWS CLI by typing aws configure in your terminal & following the instructions This profile will be used for access_key, secret_key etc.

Build AMI using Packer

Read Here

Use Terraform to provision EC2 instances

Read Here

Testing for Terraform

Destroy all instances/AMI

  1. Go to terraform/nginx directory

  2. terraform plan -destroy -var-file="../terraform.tfvars" -var "ami=${ami_id}"

  3. terraform destroy -var-file="../terraform.tfvars" -var "ami=${ami_id}"

  4. aws ec2 deregister-image --image-id ${ami_id}

  5. Go to terraform/vpc directory

  6. terraform plan -destroy

  7. terraform destroy

About

Workshop exercises for hashicorp products

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published