Skip to content
Hands-on IT IT Drills
Cover: OpenTofu hands-on

Training material

OpenTofu hands-on

Infrastructure as code, compatible with Terraform

The notes app is built as code – first as Docker containers, then on Kubernetes with Postgres from an operator and login via Keycloak. Plan and state, for_each and modules, remote state with locking and encryption, environments, import and moved, secrets without state, tflint, tofu test, Trivy, Conftest and a Gitea pipeline with the plan in the pull request. Everything applies to Terraform as well – commands, language and providers are compatible.

  • OpenTofu
  • Terraform
  • Kubernetes
  • Helm
  • Keycloak
  • CI/CD

Training plan

  1. Foreword
  2. Day 0: The Training Ground
  3. Day 1: First Resources with the Docker Provider
  4. Day 2: Variables, Outputs, locals
  5. Day 3: Understanding State
  6. Day 4: count, for_each, and Data Sources
  7. Day 5: Modules
  8. Day 6: notes on Kubernetes
  9. Day 7: Helm Provider – Postgres and notes as a Chart
  10. Day 8: Keycloak Provider – Login as Code
  11. Day 9: Remote State, Locking, and Encryption
  12. Day 10: Environments – dev and prod
  13. Day 11: Import, moved, removed
  14. Day 12: Secrets – sensitive, ephemeral, write-only
  15. Day 13: Quality and Tests
  16. Day 14: CI/CD with Gitea Actions
  17. Day 15: Competition – Disaster Drills
  18. Appendix A: Cheat Sheet
  19. Appendix B: Final Exam