terraform-tofu-labs/README.md

37 lines
1.8 KiB
Markdown
Raw Normal View History

2024-04-16 22:49:18 +00:00
![Terraform/OpenTofu Labs](./img/terraform-tofu-labs.png)
## 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
- You'll need an AWS account from [https://aws.amazon.com](https://aws.amazon.com)
- If you want to do lab 4 you'll need an account at [https://gitlab.com](https://gitlab.com)
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](./1-getting-started/README.md) - Will get you setup with the tooling and show you the basic commands
- [Lab 2](./2-simple-example/README.md) - Will introduce you to variables
- [Lab 3](./3-remote-states/README.md) - Will help you create and setup remote states using dynamoDB and S3
- [Lab 4](./4-gitlab-ci/README.md) - Will walk you through setting up a Gitlab CI/CD pipeline with Terraform (tofu coming soon)
### Links
- [Terraform](https://terraform.io)
- [OpenTofu](https://opentofu.org/)
### Trouble Shooting
#### No Space left on device
2024-04-17 13:07:15 +00:00
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.
2024-04-16 22:49:18 +00:00
![no space left on disk](./img/no-space.png)
> [!Note]
2024-04-17 13:07:15 +00:00
> 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!