This repo has terraform different examples which covers all functionality of terraform
Note: These examples deploy resources into your AWS account. Although all the resources should fall under the AWS Free Tier, it is not my responsibility if you are charged money for this.
- Install Terraform.
- Set your AWS credentials as the environment variables
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
. cd
into one of the example folders.- Run
terraform init
. - Run
terraform plan
- Run
terraform apply
. - After it's done deploying, you could see your resources in aws account.
- To clean up and delete all resources after you're done, run
terraform destroy
.