Exercises for Hashicorp Workshop
All exercises require an AWS account so create an account if you don't have it
- Go to your AWS console & create IAM user by following instructions here
- Create a user with name "usr_hashicorp" with Programmatic access & in Admin group
- Save "Access key ID" & "Secret access key" somewhere locally
Install AWS CLI following instructions here
Configure AWS CLI by typing aws configure
in your terminal & following the instructions
This profile will be used for access_key, secret_key etc.
-
Go to terraform/nginx directory
-
terraform plan -destroy -var-file="../terraform.tfvars" -var "ami=${ami_id}"
-
terraform destroy -var-file="../terraform.tfvars" -var "ami=${ami_id}"
-
aws ec2 deregister-image --image-id ${ami_id}
-
Go to terraform/vpc directory
-
terraform plan -destroy
-
terraform destroy