CloudFormation or Terraform or both :)

Search for a command to run...

No comments yet. Be the first to comment.
Or: what happens when an engineer gets tired of explaining himself to his own tools.

A small confession, before anything else The thing that pushed me to build vibestack was not a strategy meeting. It was a Tuesday evening, and I was tired. I had spent maybe forty minutes in a Claude

If you manage AWS infrastructure with code, the European Sovereign Cloud adds a new partition to think about. Different endpoints, separate IAM, its own console. This guide covers what works out of th

Introduction You know what? I see teams spinning up Kubernetes clusters for three microservices all the time. Then they spend two months figuring out pods, ingress controllers, and all that magic. And then they pay $70 per month just for three cluste...

The container orchestration landscape on AWS recently received significant enhancements with two major updates to Amazon Elastic Container Service (ECS): the introduction of ECS Managed Instances and built-in support for Linear and Canary deployment ...

Timur Galeev Blog
26 posts
Hi, I'm Timur ๐
Forward Deployed Engineer ยท AI ร Cloud. I build with LLMs, agents, and MCP servers on top of cloud infrastructure โ sitting close to the problem, prototyping fast, hardening for production.
15+ years architecting cloud platforms across AWS, GCP, and Azure. Now putting most hands-on hours into AI tooling on top of cloud, with open source as the public surface area.
Background arc: DevOps Architect โ Full Stack Developer โ Cloud Architect โ Head of IT / CTO โ AI ร Cloud / Forwa
Both tools allow provisioning AWS infrastructure as code, but have key differences in approach and capabilities.
CloudFormation uses YAML/JSON templates that define resources sequentially.
CloudFormation uses JSON/YAML templates to define AWS resources and their properties sequentially. Resources are created in the order defined in the template.
Terraform uses declarative configuration files and references between resources.
Terraform uses declarative configuration files written in HCL to define resources. Resources can reference attributes of other resources to establish dependencies between them in a flexible way.
# CloudFormation
Resources:
VPC:
Type: AWS::EC2::VPC
Subnet:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC
# Terraform
resource "aws_vpc" "main" {}
resource "aws_subnet" "example" {
vpc_id = aws_vpc.main.id
}
CloudFormation relies on the template to implicitly define the desired state. It does not maintain an explicit real-time state of deployed resources.
Terraform explicitly tracks the real-time state of all resources in a state file, usually stored locally or in remote storage like S3. This allows checking differences between the configuration and current state to maintain consistency.
CloudFormation provides CLI and APIs.
CloudFormation provides a CLI and AWS APIs for managing templates and deployments. Custom logic can be added through custom resources.
Terraform offers rich plugins and SDK for custom providers.
In addition to the CLI and APIs, Terraform has a rich plugin ecosystem and supports programming infrastructure with its own API and SDK. This allows writing custom providers, provisioners and other automation tools.
Simple single AWS account deployments use CloudFormation
Complex multi-account infrastructure uses Terraform
Automating tasks beyond IaC requires Terraform
For example, a multi-tier app could use:
CloudFormation for per-account VPCs and load balancers
Terraform for cross-account databases/queues
Custom Terraform provider to deploy containers
Version control
Stack policies
Change sets
Target types
Modules
Automation
IDE integration
In summary, while both serve IaC purposes, Terraform provides more flexibility, portability and automation capabilities - especially for multi-account, hybrid infrastructure deployments at scale.