terraform-tofu-labs/README.md

2.3 KiB

Terraform/OpenTofu Labs

Terraform and OpenTofu Labs for AWS

Welcome to the Terraform/Tofu labs for AWS. This set of labs aims to teach you the basics of terraform/tofu, to get you started on your journey. It focuses on deploying resources to AWS (Amazon Web Services) and keeps costs at a minimum.

Note

Don't forget to do the clean up steps after the labs to shut down the infrastructure.

Requirements

It's recommended that you are familiar with the linux command line and bash, however you can just copy and past from the tutorials

Labs

  • Lab 1 - Will get you setup with the tooling and show you the basic commands
  • Lab 2 - Will introduce you to variables
  • Lab 3 - Will help you create and setup remote states using dynamoDB and S3
  • Lab 4 - Will walk you through setting up a Gitlab CI/CD pipeline with Terraform (tofu coming soon)

Trouble Shooting

No Space left on device

If you experience and issue like below on your CloudShell you'll need to delete any unused terraform.tfstate and terraform.tfstate.backup in previous directories. You may also want to consider removing .terraform folders from each code directory as this will free up the most space.

no space left on disk

Note

Make sure you have run terraform destroy before deleting on-disk state files, otherwise you'll need to manually delete resources in the AWS console to avoid charges!