AWS CloudFormation is an infrastructure templating, or infrastructure as code (IaC) service provided free of charge by AWS.
HashiCorp Terraform addresses similar needs, including an IaC declarative approach, but in a cloud agnostic way.
The Mode of Usage
designed for AWS services.
Terraform covers multiple cloud platforms like Azure, AWS, GCP, Databricks and many more.
CloudFormation supports JSON and YAML.
Terraform supports Hashicorp's proprietary Language. It is JSON compatible
CloudFormation is a managed AWS service, it checks the infrastructure consistently to detect whether the provisioned infra is maintaining its state or not.
the state of the infrastructure on the provisioning machine in the form of file with .tfstate extension.
CloudFormation utilizes a system called “nested stacks.” That is, CloudFormation templates being called from within CloudFormation templates.
Terraform has a
, which are containers for multiple resources that are used together.
CloudFormation uses parameters, and has a maximum of 60 parameters per template
Terraform uses provider specific data sources. The implementation is in a modular fashion, allowing data to be fetched or computed.
So, this is all about the comparison between ClodFormation and Terraform.
I hope you enjoyed the article and if you found it useful, please share it with your friends and colleagues.