• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Gokul Deepak

Gokul Deepak

GoCool and Debug

  • Home
  • Terraform
  • WordPress
  • Android
  • How to
  • About Me

Terraform Cheat sheet

December 27, 2023 by Gokul Deepak S Leave a Comment

Terraform Cheatsheet with pdf. You can download Terraform Cheatsheet pdf with all Terraform CLI commands needed.

The mentioned list is the most used Terraform commands. If you need more additional information on each of the commands you can find it in the below link.

  • terraform version : Get terraform version
  • terraform -help : Get the list of all commands with descriptions.
  • terraform init : Initalizes terraform working directory
  • terraform init -migrate-state : Reconfigure the backend and will migrate the backend
  • terraform validate : Validates syntax and arguments of terraform files
  • terraform plan : Runs execution plan
  • terraform plan -out=pathofplan : Runs execution plan and saves in a file
  • terraform plan -destroy : Runs an execution plan for destroy
  • terraform apply : Create and update infrastructure
  • terraform apply -auto-approve : Updates infrastructure without expecting ‘yes’
  • terraform apply -var=”instance_type=t2.micro” : Runs apply with value for the variable
  • terraform apply -var-file=”varfile.tfvars” : Runs apply with variable values mentioned in the file 
  • terraform apply filename : Runs apply over the plan output created in file
  • terraform apply -target=”aws_instance.this” : Runs apply only to particular resource
  • terraform apply -parallelism=5 : Creates resources paralley. Default value is 10
  • terraform destroy : Destroys all resources in statefile
  • terraform destroy –auto-approve : Destroys infrastructure without expecting ‘yes’
  • terraform destroy -target=”aws_instance.this” : Destroys particular resource
  • terraform fmt : Formats terraform code
  • terraform fmt –recursive : Formats terraform code including subdirectories
  • terraform fmt  –diff : Displays difference after formating
  • terraform get : Downloads modules

Filed Under: Terraform

About Gokul Deepak S

Leave a ReplyCancel reply

0 Comments
Inline Feedbacks
View all comments

Primary Sidebar

Popular Pages

  • Home
  • How to find the date of the Facebook group it was created
  • Yureka Yu Plus vs Lenovo K3 Note
  • How to Install Windows without GRUB rescue
  • How to Remove LinkWithin logo under 'You Might Also Like' widget in blogger

Archives

Categories

  • Android
  • Apache
  • AWS
  • Blogger
  • Computer Tips
  • DevOps
  • Docker
  • Earn
  • Facebook Tips
  • Git
  • Google Tips
  • Hosting
  • How to
  • Laptop Tips
  • Laptops
  • Linux
  • Mobile
  • MongoDB
  • Nginx
  • Node JS
  • Notepad++
  • PostgresQL
  • Terraform
  • Ubuntu
  • Wordpress
  • Xenforo

Tags

Android Android One AWS Bluehost Comparisions Custom ROM Elementor Facebook Genesis Genesis Sample Theme Google Drive How to Lineage OS Notes OnePlus One OwnCloud Rooting Smartphones Stock ROM Studiopress Tomcat Wordpress plugin

Copyright © 2025 · Maintained by GokulDeepak

wpDiscuz