Create and switch workspace

Create a new workspace and switch to it

terraform workspace new staging && terraform workspace select staging

tool
terraform43 commands
tags
terraform

More terraform commands

  • terraform validate

    Check Terraform configuration for syntax and consistency errors

  • terraform fmt -recursive

    Auto-format all .tf files recursively

  • terraform output -json

    Print all outputs as JSON; useful for pipeline scripting

  • terraform destroy -target=module.vpc.aws_vpc.main

    Destroy a single resource without touching everything else

  • terraform taint module.eks.aws_instance.node

    Mark resource for replacement on next apply

all 43 terraform commands