Skip to content

Terraform and OpenTofu

Plan, approve and apply Terraform or OpenTofu roots as a deployment.

Category Infrastructure as code
Authentication Backend credentials via workload identity or secrets
Provider id terraform
  • Plan output attached to the deployment
  • Manual approval gate between plan and apply
  • Drift check on a schedule
  1. Install terraform or tofu on the runner pool (or use the provided image).
  2. Create an Infrastructure of kind terraform and set the working directory and workspace.
  3. Give the runner identity access to the state backend and target accounts.
  4. Add a manual gate so a human reviews the plan before apply.

Illustrative configuration. Non-secret settings are stored as integration config; credentials are stored as encrypted Slipway secrets and referenced by name.

infrastructure:
kind: terraform
config:
tool: opentofu # terraform | opentofu
working_dir: infra/prod
workspace: prod
var_files: [prod.tfvars]