Terraform is an infrastructure as code (IaC) tool that helps us to build, change, and version infrastructure safely and efficiently.  

Terraform in simple words helps to provision the infrastructure.

Terraform helps automate and manage our infrastructure, our platform, and services that run on our platform. 

Terraform is an open-source project by HashiCorp.

Terraform is declarative.

Advertisements

Terraform Architecture includes 3 main components.

  1. Terraform Core
  2. Terraform Config file (*.tf file)
  3. Terraform State file (*.tfstate)
Advertisements

Terraform commands

terraform init

Terraform init initializes all modules we mentioned in the main.tf file.

terraform plan

Terraform plan check whether the execution plan for a configuration matches your expectations before provisioning or changing infrastructure.

terraform apply

Terraform apply command actually create the entire infrastructure based on changes terraform state file.

terraform destroy

Advertisements

Note:- Terraform have the concept of Idempotency which makes sure that how many time we execute/apply terraform the infrastructure will remain same until the state is not changed.

Thank you for reading this article, I really appreciate it. If you have any questions feel free to leave a comment.

Leave a Reply