0
0
Terraformcloud~10 mins

Workspace naming conventions 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 set the Terraform workspace name to "production".

Terraform
terraform workspace select [1]
Drag options to blanks, or click blank then click option'
Aproduction
Btest
Cdevelopment
Dstaging
Attempts:
3 left
💡 Hint
Common Mistakes
Using a workspace name that does not exist.
Including quotes around the workspace name.
2fill in blank
medium

Complete the code to create a new Terraform workspace named "staging".

Terraform
terraform workspace [1] staging
Drag options to blanks, or click blank then click option'
Acreate
Bnew
Cselect
Dinit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'new' instead of 'create'.
Trying to select a workspace before it exists.
3fill in blank
hard

Fix the error in the command to switch to the "dev" workspace.

Terraform
terraform workspace [1] dev
Drag options to blanks, or click blank then click option'
Acreate
Bselect
Cinit
Dapply
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' instead of 'select' to switch workspaces.
Using 'init' which initializes Terraform but does not switch workspaces.
4fill in blank
hard

Fill both blanks to list all Terraform workspaces and then switch to the "test" workspace.

Terraform
terraform workspace [1]
terraform workspace [2] test
Drag options to blanks, or click blank then click option'
Alist
Bselect
Ccreate
Dinit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' instead of 'list' to show workspaces.
Using 'init' which does not list or select workspaces.
5fill in blank
hard

Fill all three blanks to create a new workspace named "qa", switch to it, and then show the current workspace.

Terraform
terraform workspace [1] qa
terraform workspace [2] qa
terraform workspace [3]
Drag options to blanks, or click blank then click option'
Anew
Bselect
Cshow
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'list' instead of 'show' to display current workspace.
Switching workspace before creating it.