[Terraform] Common commands for Terraform

[Terraform] Common commands for Terraform

  • Download and install provider

      terraform init
    
  • Format and validate the configuration

      terraform fmt
      terraform validate
    
  • Show changes required by the current configuration

      terrafrom plan
    
  • Create infrastructure

      terraform apply
    
  • When you applied your configuration, Terraform wrote data into a file called terraform.tfstate

      terraform show
    
  • Manually managing state, show the list of resources in project’s state

      terraform state list
    
  • Terminate resources managed by Terraform project

      terraform destroy