0
0
Terraformcloud~10 mins

Terraform vs CloudFormation vs Pulumi - Visual Side-by-Side Comparison

Choose your learning style9 modes available
Process Flow - Terraform vs CloudFormation vs Pulumi
Start: Choose IaC Tool
Deploy Infrastructure
Manage State & Updates
Infrastructure Ready
The flow shows choosing between Terraform, CloudFormation, or Pulumi, then deploying and managing infrastructure.
Execution Sample
Terraform
terraform {
  required_providers {
    aws = { source = "hashicorp/aws" version = "~> 4.0" }
  }
}
resource "aws_s3_bucket" "example" {
  bucket = "my-unique-bucket-12345"
}
This Terraform code creates an AWS S3 bucket named 'my-unique-bucket-12345'.
Process Table
StepActionTool BehaviorResult
1Initialize TerraformReads config, downloads AWS providerReady to plan
2terraform planCompares desired state with currentShows bucket to create
3terraform applyCreates S3 bucket in AWSBucket 'my-unique-bucket-12345' created
4CloudFormation equivalentUses JSON/YAML templateCreates same bucket in AWS
5Pulumi equivalentUses code in Python/JS/etc.Creates same bucket in AWS
6Manage updatesTerraform tracks state fileUpdates or deletes resources as needed
7ExitInfrastructure deployed and managedReady for use
💡 Infrastructure is deployed and managed by the chosen tool.
Status Tracker
VariableStartAfter InitAfter PlanAfter ApplyFinal
terraform_stateemptyinitializedplanned (bucket to create)applied (bucket created)current state with bucket
aws_s3_bucket.examplenonedefined in configplanned for creationcreated in AWSexists and ready
Key Moments - 3 Insights
Why does Terraform use a state file while CloudFormation does not?
Terraform keeps a local or remote state file to track resources across clouds, while CloudFormation manages state internally within AWS. See execution_table rows 6 and 4.
Can Pulumi use the same languages as Terraform?
No, Pulumi uses general-purpose languages like Python or JavaScript, while Terraform uses its own HCL language. See concept_flow and execution_table rows 5 and 1.
Why choose CloudFormation over Terraform?
CloudFormation is AWS-native and may have faster support for new AWS features. Terraform supports multiple clouds but may lag. See concept_flow and execution_table rows 4 and 1.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, at which step is the S3 bucket actually created in AWS?
AStep 3
BStep 4
CStep 2
DStep 6
💡 Hint
Check the 'Result' column for when the bucket is created.
According to variable_tracker, what is the state of 'terraform_state' after 'terraform plan'?
Aempty
Binitialized
Cplanned (bucket to create)
Dapplied (bucket created)
💡 Hint
Look at the 'After Plan' column for 'terraform_state'.
If you want to use Python code to define infrastructure, which tool from concept_flow would you pick?
ACloudFormation
BPulumi
CTerraform
DNone of these
💡 Hint
See the 'Pulumi' box in concept_flow mentioning general languages.
Concept Snapshot
Terraform, CloudFormation, and Pulumi are tools to create cloud infrastructure.
Terraform uses HCL and supports many clouds.
CloudFormation is AWS-only and uses JSON/YAML.
Pulumi uses real programming languages and supports many clouds.
All deploy resources and manage updates differently.
Full Transcript
This visual execution compares Terraform, CloudFormation, and Pulumi. It starts with choosing a tool, then shows Terraform code creating an AWS S3 bucket. The execution table traces initialization, planning, applying, and managing infrastructure. Variable tracking shows how Terraform state and resource definitions change step-by-step. Key moments clarify differences in state management, language use, and cloud support. The quiz tests understanding of when resources are created, state changes, and tool language options. The snapshot summarizes key points for quick recall.