0
0
Terraformcloud~10 mins

When workspaces are appropriate 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 Terraform workspace named 'production'.

Terraform
terraform workspace [1] production
Drag options to blanks, or click blank then click option'
Alist
Bcreate
Cdelete
Dselect
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' instead of 'select' to switch workspace.
Using 'list' which only shows workspaces.
Using 'delete' which removes a workspace.
2fill in blank
medium

Complete the code to create a new Terraform workspace called 'staging'.

Terraform
terraform workspace [1] staging
Drag options to blanks, or click blank then click option'
Ashow
Bselect
Ccreate
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'select' which only switches to existing workspace.
Using 'show' which displays current workspace.
Using 'list' which only lists workspaces.
3fill in blank
hard

Fix the error in the command to show the current workspace.

Terraform
terraform workspace [1]
Drag options to blanks, or click blank then click option'
Ashow
Bcreate
Cselect
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'list' which shows all workspaces, not current.
Using 'select' which switches workspace.
Using 'create' which makes a new workspace.
4fill in blank
hard

Fill both blanks to list all workspaces and then switch to the 'dev' workspace.

Terraform
terraform workspace [1]
terraform workspace [2] dev
Drag options to blanks, or click blank then click option'
Alist
Bselect
Ccreate
Dshow
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' instead of 'select' to switch workspace.
Using 'show' instead of 'list' to see all workspaces.
5fill in blank
hard

Fill all three blanks to create a workspace 'test', switch to it, and then show the current workspace.

Terraform
terraform workspace [1] test
terraform workspace [2] test
terraform workspace [3]
Drag options to blanks, or click blank then click option'
Acreate
Bselect
Cshow
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up 'list' with 'show'.
Using 'select' before 'create'.
Skipping the 'show' command.