CoursesInfrastructure as Code & automationIntermediate · Beyond Terraform

CloudFormation & Crossplane

Cloud-native and Kubernetes-native IaC.

Intermediate12 min · lesson 14 of 23

Two more provisioning tools round out the landscape, each tied to a specific world. AWS CloudFormation is Amazon’s native IaC — it provisions AWS resources from YAML/JSON templates, is deeply integrated with AWS (it manages state for you as "stacks", and knows every service immediately), and requires no extra tooling on AWS. Its limitation is the flip side: it is AWS-only, so a multi-cloud or cloud-agnostic team usually prefers Terraform. You will meet CloudFormation constantly in AWS-centric organizations and in AWS’s own documentation and services.

template.yaml (CloudFormation)
Resources:
WebServer:
Type: AWS::EC2::Instance # AWS-native resource types
Properties:
ImageId: ami-0abc123
InstanceType: t3.micro
Tags: [{ Key: Name, Value: web-server }]
# deployed as a "stack"; AWS tracks state for you — no separate state file to manage

CloudFormation vs Terraform on AWS

On AWS specifically, the choice is real. CloudFormation manages state for you (no S3 backend to set up), has same-day support for new AWS features, and integrates with AWS-native workflows and rollback. Terraform is cloud-agnostic (one tool for AWS, Azure, GCP, and everything else), has a larger module ecosystem, and many find its HCL and plan output friendlier. Teams all-in on AWS sometimes prefer CloudFormation (or the CDK, which generates it from real code); teams valuing one workflow across clouds prefer Terraform. Both are declarative with the same core ideas.

Crossplane: infrastructure through Kubernetes

Crossplane is a newer, distinctly different approach: it provisions cloud infrastructure using Kubernetes itself as the control plane. You declare cloud resources as Kubernetes custom resources (a "database" or "bucket" as a K8s object), and Crossplane’s controllers continuously reconcile the real cloud resources to match — bringing Kubernetes’ desired-state reconciliation and GitOps model to cloud provisioning. It appeals to platform teams already living in Kubernetes who want to offer self-service infrastructure through the same API, and it is inherently continuous (always reconciling) rather than run-on-demand like Terraform.

Match the tool to where your team already lives
These tools are less "better/worse" than "fit for a context." CloudFormation fits deep AWS shops that want native integration and no state management; Terraform/OpenTofu fit teams wanting one cloud-agnostic workflow; Crossplane fits platform teams standardizing on Kubernetes as the control plane for everything. The wrong move is picking by novelty — adopting Crossplane because it is trendy when your team barely runs Kubernetes, or fighting CloudFormation in a pure-AWS shop. Choose the provisioning tool that matches your platform and your team’s existing expertise; the IaC principles are the same across all of them.