Create and switch workspace
Create a new workspace and switch to it
terraform workspace new staging && terraform workspace select staging
More terraform commands
-
terraform validateCheck Terraform configuration for syntax and consistency errors
-
terraform fmt -recursiveAuto-format all .tf files recursively
-
terraform output -jsonPrint all outputs as JSON; useful for pipeline scripting
-
terraform destroy -target=module.vpc.aws_vpc.mainDestroy a single resource without touching everything else
-
terraform taint module.eks.aws_instance.nodeMark resource for replacement on next apply