Infrastructure as Code in 2025 - what changed
The IaC landscape shifted in 2025. Terraform moved to Business Source License (no longer open source), HashiCorp deprecated CDKTF in December 2025, and AWS CDK continues to mature. Here is the updated comparison with security implications for each approach.
No state file to manage - AWS tracks resource state internally
Multi-cloud, massive provider ecosystem, plan/apply workflow
Write IaC in TypeScript, Python, Java - with IDE support and testing
| Criteria | CloudFormation | HashiCorp Terraform | CDK |
|---|---|---|---|
| Language | JSON / YAML | HCL | TypeScript, Python, Java, C#, Go |
| Multi-Cloud | No (AWS only) | Yes | No (AWS only) |
| State Management | AWS-managed (no state file) | State file (S3 + DynamoDB or Terraform Cloud) | AWS-managed (synthesizes to CloudFormation) |
| Drift Detection | Yes (built-in) | terraform plan (manual) | Via CloudFormation |
| License | Proprietary (free AWS service) | Business Source License (BSL) | Apache 2.0 (synthesizes to CloudFormation) |
| CDKTF Support | N/A | Deprecated (Dec 2025) | N/A |
| Module Ecosystem | Limited | Terraform Registry (15K+ modules) | Construct Hub (1,500+ constructs) |
| Rollback on Failure | Automatic | No (manual terraform destroy) | Automatic (via CloudFormation) |
The Terraform state file stores all resource attributes, including database passwords, API keys, and certificates in plaintext. Always use encrypted S3 backend with DynamoDB state locking.
HashiCorp deprecated CDKTF in December 2025. If you use it, existing deployments work but you receive no security patches or updates. Migrate to native Terraform HCL or AWS CDK.
Since August 2023, Terraform uses the Business Source License (BSL). It is free for most use cases, but competitive hosting is restricted. OpenTofu is the open-source fork if this matters.
Use checkov, tfsec, or cfn-nag to scan your templates before deployment. These tools catch public S3 buckets, unencrypted EBS volumes, and overly permissive security groups.
These comparisons are a starting point. Every architecture is different. Contact us for tailored AWS security assessments and architectural guidance.