CertKeen

Terraform Associate (004) · Free practice question 3 of 12

Default CLI workspace cannot be deleted

An engineer at Tresco Mobile runs terraform workspace delete default to clean up a working directory. What happens?

  1. A.Terraform deletes the default workspace and its state
  2. B.Terraform renames the default workspace to the next workspace in alphabetical order
  3. C.Terraform deletes every workspace except default
  4. D.Terraform refuses, because the default workspace always exists and cannot be deleted
Show answer and explanation

Correct answer: D. Terraform refuses, because the default workspace always exists and cannot be deleted

Why: Every initialized working directory has a workspace named default, which cannot be deleted. Other workspaces can be deleted with terraform workspace delete, normally after switching away from them. Terraform never renames workspaces or deletes other workspaces as a side effect.

More free Terraform Associate (004) questions