OpenTofu is the open source fork of Terraform. Both read the same .tf files.
The workshop runs in a Linux shell. On Windows that is WSL, so open your WSL terminal and work there for everything below.
devbox pins the OpenTofu version for everybody:
devbox shellCheck with tofu --version.
If you have no WSL at all, install OpenTofu natively instead, in PowerShell with
winget install --exact --id=OpenTofu.Tofu. The exercises then work the same, only the paths use
backslashes.
- provider talks to one system, here your filesystem or Conduktor.
- resource is one thing you want to exist, described in a
.tffile. - data source is something that already exists and is only read.
- state is the record of what OpenTofu created, in
terraform.tfstate. - plan compares your files against that record and prints the difference.
- apply carries the plan out.
| Folder | Topic |
|---|---|
01_file |
A resource, and the state behind it |
02_data |
Reading something you do not own |
03_variables |
Inputs, outputs, one resource per entry |
04_module |
The same, wrapped in a module |
05_conduktor |
Kafka topics in Conduktor Console |
Each folder has a README. Change into it and run:
tofu init # once per folder
tofu plan # what would change
tofu apply # do it
tofu destroy # undo it05_conduktor needs the Console from conduktor-local/ running.
terraform.tfstate is what OpenTofu remembers, keep it. .terraform/ holds the downloaded
providers, tofu init recreates it. .terraform.lock.hcl pins provider versions, commit it.