βΆWhat's the deal with Terraform vs OpenTofu after the BSL license fork in 2024?
In August 2024, HashiCorp changed Terraform's license from open-source MPLv2 to Business Source License (BSL), restricting vendors from offering hosted Terraform services. OpenTofu (Linux Foundation) is the community-driven fork with identical syntax and state files. For 2026: OpenTofu is fully compatible with existing Terraform code, has feature parity, and is the go-to choice if you want to avoid vendor lock-in or licensing surprises. HashiCorp Terraform Cloud still works if you need enterprise features (cost estimation, policy as code via Sentinel). Small teams: use OpenTofu or Terraform + self-hosted runner (Atlantis). Enterprises: evaluate both, same knowledge applies to both.
βΆTerraform vs Pulumi vs AWS CDK β which should I learn?
Terraform: declarative HCL, JSON-like syntax, multi-cloud (AWS/GCP/Azure), 2000+ providers, biggest ecosystem. Pulumi: imperative (Python/Go/TypeScript/C#), full Turing-complete language, same providers as Terraform, easier for developers from app backgrounds. AWS CDK: AWS-only, full TypeScript/Python, constructs abstract common patterns, generates CloudFormation under the hood, best for AWS-heavy orgs. Pick one: Terraform if you need multi-cloud or legacy org knowledge. Pulumi if your team is Python/Go devs who hate HCL. CDK if AWS-only and you want the fastest onboarding. Learn all three = portable across orgs; start with Terraform (widest job market).
βΆDeclarative vs imperative IaC β why does it matter?
Declarative (Terraform, CloudFormation): you define end state ('I want 5 EC2 instances'), tool figures out what to change. Idempotent, repeatable, reads current state first. Imperative (Ansible, scripts): you define steps ('run apt-get, then systemctl start'). Works but can drift if steps fail midway. Hybrid: Terraform handles declaration, Ansible handles configuration inside instances. For pure infrastructure (compute, networking, databases): declarative wins. For OS-level setup (package installs, daemon config): imperative (Ansible). In 2026: declarative + Terraform is table-stakes for DevOps roles.
βΆHow do I handle state management and prevent merge conflicts?
State file tracks real infrastructure; it's sacred. Local state = single machine only (fine for solo/learning). Remote state (S3 + DynamoDB, Terraform Cloud, Spacelift) = team multi-edit safe. Setup: Terraform init with backend config (S3 + DynamoDB lock for atomic writes, prevents simultaneous applies). Gitops flow: PR β Terraform plan (preview) β review β merge β Terraform apply (git branch = single source of truth). Use state locks (default in remote backends) and avoid manual edits. For large orgs: Spacelift/env0 provide policy enforcement + approval workflows on top of Terraform.
βΆDrift detection β what is it and why should I care?
Drift = infrastructure changed outside Terraform (manual AWS console click, app deployment that modified firewall). Terraform plan detects drift (shows 'will modify' resources Terraform didn't change). Why it matters: Terraform is your single source of truth; if reality diverges, you lose control. Solution: (1) forbid manual changes (use Terraform for everything), (2) run 'terraform plan' in CI daily/hourly and alert on drift, (3) use Spacelift/env0 with auto-remediation to revert drift. For mission-critical infra: hourly drift detection + alert on Slack.
βΆCrossplane β Kubernetes-native IaC. Should I learn it alongside Terraform?
Crossplane is a control plane that runs inside Kubernetes and manages cloud resources (AWS, GCP, Azure) as Kubernetes objects (CRDs). Pros: unified Kubernetes workflows, GitOps-native via ArgoCD, works in environments already using K8s. Cons: adds complexity, requires Kubernetes knowledge upfront, smaller ecosystem than Terraform (fewer providers, less tooling). 2026 trend: Crossplane is gaining adoption in Kubernetes-first orgs (platform teams, service mesh users) but Terraform still dominates job market. Learn Terraform first; Crossplane is specialist skill for teams that've gone all-in on Kubernetes.
βΆAI in IaC 2026 β what's changing?
Claude/ChatGPT can draft Terraform modules from requirements (e.g., 'create a VPC with 3 subnets and NAT gateway' β valid HCL). Tools like Cursor IDE + Claude now auto-complete Terraform blocks. HashiCorp is experimenting with AI cost estimation in Terraform Cloud. Gotchas: AI-generated IaC is a starting point, not production-ready β review for security (no hardcoded secrets), state management, idempotence. 2026 best practice: use AI for module scaffolding, then review/test/version-control like any code. Don't trust AI with security-sensitive infra (databases, IAM, encryption).