0
0
Terraformcloud~10 mins

Default workspace in Terraform - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select the default Terraform workspace.

Terraform
terraform workspace select [1]
Drag options to blanks, or click blank then click option'
Adefault
Bdev
Cprod
Dstaging
Attempts:
3 left
💡 Hint
Common Mistakes
Using workspace names like 'prod' or 'dev' which are not default.
Forgetting to specify the workspace name.
2fill in blank
medium

Complete the code to create a new workspace named 'test'.

Terraform
terraform workspace [1] test
Drag options to blanks, or click blank then click option'
Acreate
Binit
Cselect
Dnew
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' instead of 'new'.
Using 'select' which switches but does not create.
3fill in blank
hard

Fix the error in the command to list all workspaces.

Terraform
terraform workspace [1]
Drag options to blanks, or click blank then click option'
Alist
Bstatus
Cshow
Dls
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'show' or 'status' which are invalid for listing workspaces.
Using 'ls' when the full command 'list' is expected here.
4fill in blank
hard

Fill both blanks to create and switch to a new workspace named 'prod'.

Terraform
terraform workspace [1] prod && terraform workspace [2] prod
Drag options to blanks, or click blank then click option'
Anew
Bdelete
Cselect
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'delete' or 'list' instead of 'new' or 'select'.
Switching before creating the workspace.
5fill in blank
hard

Fill all three blanks to delete the workspace named 'old' and switch to default.

Terraform
terraform workspace [1] old && terraform workspace [2] [3]
Drag options to blanks, or click blank then click option'
Adelete
Bselect
Cdefault
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to delete the default workspace.
Not switching to a workspace before deleting another.