The aim of this repo is to take someone who has never used Terraform before on a tour of Terraform CLI basics. Note that OpenTofu is an open-source fork of Terraform that is also gaining traction. Whilst functionality of both may diverge over time, terraform 1.6.6 and tofu 1.6.2 are feature compatible.
Technically experienced people who just haven't gotten around to looking at Terraform yet. An understanding of 'git' is encouraged to unlock each step so that followers can see how the code builds from the ground up. Besides, git is the de facto standard tool for source control management and is used widely to manage terraform code, so it's good to get some practice with it.
- Developed on Linux, but should work on MacOS or similar *nix based OS. Terraform does also run on Windows, but one must be careful of line-endings etc.
- An Internet connection and an AWS subscription are required.
- Git is also recommended to facilitate the progression through the 'steps', although not essential as everything is right there at the head of the master branch anyway.
- A pre-created ssh keypair is required at the default name and location for step5. You can create a one easily enough, it's documented widely, for example here.
- Optionally, pre-installation of Python and the module
awscli
could come in handy for verification. - Follow the install instructions provided by Hashicorp or the OpenTofu community to install the cli tools for your platform.
Verified with terraform 1.6.6 and tofu 1.6.2, although the code should be compatible with later versions.
terraform101 workshop Copyright (C) 2020 Nigel Gibbs
This file is part of terraform101 workshop.
terraform101 workshop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
terraform101 workshop is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with terraform101 workshop. If not, see https://www.gnu.org/licenses/.
To start with more or less nothing but this readme file and see how the project builds without being over-faced, then start here:
-
Install git, a good article for that can be found here.
-
Create a suitable location to hold a checkout directory and clone this git repo:
mkdir -p ~/git/gibbsoft cd ~/git/gibbsoft git clone https://github.com/gibbsoft/terraform101.git cd terraform101
-
Examine the files in the directory using your favourite text editor. Personally, I prefer vscode these days, although
vi
andnano
are often pre-installed on *nix platforms.
Then head over to the step1 directory and start with the step1/README.md file.