TA-002-P · Question #225
A user has created three workspaces using the command line -prod, dev, and test. The user wants to create a fourth workspace named stage. Which command will the user execute to accomplish this?
The correct answer is A. terraform workspace new stage. The correct syntax for creating a new Terraform workspace is terraform workspace new <name>. So terraform workspace new stage creates the 'stage' workspace and automatically switches to it. Options B and C use invalid flag syntax (-new, -create). Option D uses 'create' which is…
Question
A user has created three workspaces using the command line -prod, dev, and test. The user wants to create a fourth workspace named stage. Which command will the user execute to accomplish this?
Options
- Aterraform workspace new stage
- Bterraform workspace -new stage
- Cterraform workspace -create stage
- Dterraform workspace create stage
How the community answered
(48 responses)- A90% (43)
- B2% (1)
- C2% (1)
- D6% (3)
Explanation
The correct syntax for creating a new Terraform workspace is terraform workspace new <name>. So terraform workspace new stage creates the 'stage' workspace and automatically switches to it. Options B and C use invalid flag syntax (-new, -create). Option D uses 'create' which is not a valid subcommand - the correct subcommand is 'new'.
Topics
Community Discussion
No community discussion yet for this question.