Evaluating Modern Infrastructure as Code Paradigms
Selecting an Infrastructure as Code (IaC) framework defines how your DevOps team manages state locking, concurrency drift, modularity, and CI/CD security validation.
Key Architectural Differences
- Terraform (HashiCorp): Uses HCL2 declaratively; state locking via DynamoDB/S3; BSL license model.
- OpenTofu (Linux Foundation): Open-source fork (MPL 2.0); drop-in replacement with state encryption support.
- Pulumi: Uses TypeScript, Python, or Go; imperative program logic generating declarative state trees.
Production OpenTofu State Encryption Manifest
opentofu {
encryption {
key_provider "aws_kms" "main" {
kms_key_id = "arn:aws:kms:us-east-1:123456789012:key/abc-123"
}
method "aes_gcm" "prod" {
keys = key_provider.aws_kms.main
}
state {
method = method.aes_gcm.prod
}
}
}