0
0
Terraformcloud~10 mins

Terraform state pull and push - Interactive Code Practice

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

Complete the code to pull the Terraform state from the remote backend.

Terraform
terraform state [1]
Drag options to blanks, or click blank then click option'
Ainit
Bpush
Capply
Dpull
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'push' instead of 'pull'.
Using 'apply' which runs changes, not state commands.
2fill in blank
medium

Complete the code to push a local Terraform state file to the remote backend.

Terraform
terraform state [1]
Drag options to blanks, or click blank then click option'
Aplan
Bdestroy
Cpush
Dpull
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pull' instead of 'push'.
Using 'plan' which only shows changes.
3fill in blank
hard

Fix the error in the command to pull the Terraform state from the remote backend.

Terraform
terraform state [1]
Drag options to blanks, or click blank then click option'
Apush
Bpull
Cshow
Drefresh
Attempts:
3 left
💡 Hint
Common Mistakes
Adding 'state' after 'pull'.
Using 'show' which displays state but does not pull.
4fill in blank
hard

Fill both blanks to correctly pull and then push the Terraform state.

Terraform
terraform state [1] && terraform state [2]
Drag options to blanks, or click blank then click option'
Apull
Bpush
Capply
Dplan
Attempts:
3 left
💡 Hint
Common Mistakes
Reversing the order of pull and push.
Using 'apply' or 'plan' instead of pull/push.
5fill in blank
hard

Fill all three blanks to pull the state, show it, and then push it back.

Terraform
terraform state [1] && terraform [2] state [3]
Drag options to blanks, or click blank then click option'
Apull
Bpush
Cshow
Drefresh
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'plan' instead of 'show'.
Pushing before pulling.