Terraform and AWS CloudFormation are Infrastructure as Code (IaC) tools.Terraform is multi-cloud with support for AWS, Azure, GCP, etc., while CloudFormation is limited to AWS.Terraform uses HCL language, offers state management through a .tfstate file, and supports modular design.CloudFormation uses YAML or JSON, manages state internally, and has nested stacks for reusability.