0
0
Terraformcloud~10 mins

Terraform CLI overview - Interactive Code Practice

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

Complete the code to initialize a Terraform working directory.

Terraform
terraform [1]
Drag options to blanks, or click blank then click option'
Aapply
Bdestroy
Cplan
Dinit
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' instead of 'init' to initialize the directory.
Confusing 'plan' with initialization.
2fill in blank
medium

Complete the code to see the changes Terraform will make to your infrastructure.

Terraform
terraform [1]
Drag options to blanks, or click blank then click option'
Ainit
Bvalidate
Cplan
Dapply
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' when you only want to preview changes.
Confusing 'validate' with planning.
3fill in blank
hard

Fix the error in the command to apply changes to infrastructure.

Terraform
terraform [1] -auto-approve
Drag options to blanks, or click blank then click option'
Aapply
Bplan
Cinit
Ddestroy
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'plan' instead of 'apply' to make changes.
Using 'init' which only initializes the directory.
4fill in blank
hard

Fill both blanks to destroy all managed infrastructure without confirmation.

Terraform
terraform [1] -[2]
Drag options to blanks, or click blank then click option'
Adestroy
Bauto-approve
Capply
Dplan
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' instead of 'destroy' to delete resources.
Forgetting the '-auto-approve' flag and getting stuck at confirmation.
5fill in blank
hard

Fill both blanks to validate the Terraform configuration and show detailed output.

Terraform
terraform [1] -[2]
Drag options to blanks, or click blank then click option'
Avalidate
Bjson
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'plan' or 'apply' instead of 'validate' for syntax checking.
Misusing the output flag.