← All insightsProduction

Running OpenTofu in production: a hardening checklist

CodeWizard Engineering · 11 December 2025 · 3 min read · Advanced

Demos and production are different sports. This checklist covers what changes when OpenTofu has to be reliable, secure and observable under real load.

Security and reliability defaults

  • Encrypt state at rest (native or backend-side)
  • Scan with tfsec/Checkov like any Terraform code

A production-minded config

Identical HCL to Terraform - just run with tofu.

hcl
terraform {
  required_providers { aws = { source = "hashicorp/aws" } }
  encryption {          # OpenTofu native state encryption
    key_provider "pbkdf2" "k" { passphrase = var.state_pass }
    method "aes_gcm" "m" { keys = key_provider.pbkdf2.k }
    state { method = method.aes_gcm.m }
  }
}

Operational best practices

  • Standardize on one binary per project
  • Use native state encryption for sensitive state
  • Pin provider versions and commit the lock file
In production, boring and reproducible beats clever every time.

Want senior help putting OpenTofu to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult