Terraform
Krishna Neupane

About
Terraform is an infrastructure as code tool that enables you to safely and predictably provision and manage infrastructure in any cloud.
Terraform cheatsheet
CLI commands
| Command | Description |
|---|---|
| terraform init | Initialize Terraform |
| terraform plan | Create a plan |
| terraform apply | Apply the plan |
| terraform destroy | Destroy the infrastructure |
| terraform import [resource_name] [resource_id] | To import an existing infrastructure |
| terraform show | To see the state of the infrastructure |
| terraform state list | To list all the resources that Terraform is managing |
| terraform state show [resource_name] | To get detailed information about a specific resource |
| terraform validate | To validate the syntax of the Terraform files |
| terraform providers | To see a list of all the available Terraform providers |
| terraform version | To see the version of Terraform currently installed |
| terraform apply -var '[variable_name]=[value] | To override a variable value from the command line |
| Command | Description |
|---|---|
| terraform init | Initialize Terraform |
| terraform plan | Create a plan |
| terraform apply | Apply the plan |
| terraform destroy | Destroy the infrastructure |
| terraform import [resource_name] [resource_id] | To import an existing infrastructure |
| terraform show | To see the state of the infrastructure |
| terraform state list | To list all the resources that Terraform is managing |
| terraform state show [resource_name] | To get detailed information about a specific resource |
| terraform validate | To validate the syntax of the Terraform files |
| terraform providers | To see a list of all the available Terraform providers |
| terraform version | To see the version of Terraform currently installed |
| terraform apply -var '[variable_name]=[value] | To override a variable value from the command line |
Follow me on : Medium Linkedin Researchgate