List workspaces
Show all workspaces; the current one is marked with *
terraform workspace list
More terraform commands
-
terraform workspace new staging && terraform workspace select stagingCreate a new workspace and switch to it
-
terraform validateCheck Terraform configuration for syntax and consistency errors
-
terraform fmt -recursiveAuto-format all .tf files recursively
-
terraform output -jsonPrint all outputs as JSON; handy in pipeline scripts
-
terraform destroy -target=module.vpc.aws_vpc.mainDestroy one resource and leave everything else alone