Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create a new Terraform workspace named "dev".
Terraform
terraform workspace [1] dev Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'select' instead of 'create' will switch workspaces but not create one.
Using 'delete' will remove a workspace, not create it.
✗ Incorrect
Use terraform workspace create to make a new workspace.
2fill in blank
mediumComplete the code to switch to the existing Terraform workspace named "prod".
Terraform
terraform workspace [1] prod Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' will try to make a new workspace instead of switching.
Using 'list' only shows available workspaces.
✗ Incorrect
Use terraform workspace select to switch to an existing workspace.
3fill in blank
hardFix the error in the command to list all Terraform workspaces.
Terraform
terraform workspace [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'show' will display the current workspace only.
Using 'select' requires a workspace name.
✗ Incorrect
Use terraform workspace list to see all workspaces.
4fill in blank
hardFill both blanks to create and then switch to a workspace named "staging".
Terraform
terraform workspace [1] staging && terraform workspace [2] staging
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to select before creating the workspace causes an error.
Using 'delete' or 'list' in these commands is incorrect.
✗ Incorrect
First create the workspace with create, then switch to it with select.
5fill in blank
hardFill all three blanks to create a workspace named "test", switch to it, and then list all workspaces.
Terraform
terraform workspace [1] test && terraform workspace [2] test && terraform workspace [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'show' instead of 'list' will only show the current workspace.
Switching before creating causes errors.
✗ Incorrect
Create the workspace with create, switch with select, and list all with list.