Back to course

CI/CD: GitHub Actions for IaC

Infrastructure as Code (Terraform & OpenTofu Mastery)

Automating the Workflow

You shouldn't run apply from your laptop in production. You should push code to GitHub and let GitHub Actions do it.

Basic Workflow:

  1. Developer creates a Pull Request.
  2. GitHub runs tofu plan and comments on the PR.
  3. Senior review.
  4. Merge to main -> GitHub runs tofu apply.