In this tutorial, to learn about Terraform commands cheat sheet.
Terraform commands cheat sheet.
Initialize the terraform stack and download provider plugins as per provider and also verify the syntax
How to display the preview of the resources that are going to be created, updated, and destroyed.
Build or change infrastructure.
Destroy terraform-managed infrastructure.
Run plan or apply or destroy only to the target resource
#terraform plan -target=resource #terraform apply -target=resource #terraform destroy -target=resource
Show human-readable output from Terraform state.
How to validate terraform syntax
Rewrites terraform code to a canonical format. This useful run command before git commit that codes very nicely formatted.
Manually mark a resource for re-creation
Download and install modules for the configurations. When you update the module.
Create a visual dependency graph of resources.
Configure remote state storage.
Use this command for advanced state management.
You have learned about Terraform commands cheat sheet. I hope will this your helpful. Thank you for reading the DevopsRoles page!