Back to Cheat Sheets

Terraform Cloud CLI Commands

Commands to interact with Terraform Cloud.

Action Command Details
Login terraform login Authenticate Terraform CLI.
Init workspace terraform init Initialize Terraform working directory.
Plan changes terraform plan Preview infrastructure changes.
Apply changes terraform apply Apply infrastructure changes.
Destroy infrastructure terraform destroy Remove infrastructure.
Show state terraform show Show current state.
Format code terraform fmt Format configuration files.
Validate config terraform validate Check config syntax.
Workspace list terraform workspace list List Terraform workspaces.
Select workspace terraform workspace select <name> Switch workspace.
LoopPlunk
Support Us