Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to show the Terraform plan output.
Terraform
terraform [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' runs the changes instead of showing them.
Using 'destroy' deletes resources instead of planning.
Using 'init' initializes the working directory but does not show plan.
✗ Incorrect
The terraform plan command shows the changes Terraform will make without applying them.
2fill in blank
mediumComplete the code to save the Terraform plan output to a file.
Terraform
terraform plan -out=[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a .txt or .json extension is not standard for plan files.
Using 'state.tf' is incorrect as it relates to state files, not plans.
✗ Incorrect
The -out option saves the plan to a file, commonly named tfplan.
3fill in blank
hardFix the error in the command to apply a saved Terraform plan.
Terraform
terraform [1] tfplan Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'plan' again only shows the plan, does not apply.
Using 'init' initializes but does not apply.
Using 'destroy' deletes resources instead of applying.
✗ Incorrect
The terraform apply command applies the changes from a saved plan file.
4fill in blank
hardFill both blanks to output the Terraform plan in JSON format.
Terraform
terraform [1] [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' instead of 'plan' will apply changes.
Using '-format' is not a valid Terraform option.
✗ Incorrect
Use terraform plan -json to output the plan in JSON format.
5fill in blank
hardFill all three blanks to read and show the Terraform plan output file.
Terraform
terraform [1] [2] [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-out' instead of '-json' will not format output as JSON.
Using 'apply' instead of 'show' will apply changes.
✗ Incorrect
The command terraform show -json tfplan reads and displays the saved plan in JSON format.