0
0
Terraformcloud~10 mins

Terraform apply for execution - Interactive Code Practice

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

Complete the command to apply the Terraform configuration.

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

Complete the command to apply Terraform changes automatically without asking for confirmation.

Terraform
terraform apply [1]
Drag options to blanks, or click blank then click option'
A-refresh=false
B-lock=false
C-var-file
D-auto-approve
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-refresh=false' which disables state refresh but does not skip approval.
Using '-var-file' which specifies variable files but does not skip approval.
3fill in blank
hard

Fix the error in the command to apply Terraform changes with a specific variable file.

Terraform
terraform apply [1]=production.tfvars
Drag options to blanks, or click blank then click option'
A-var-file
B-auto-approve
C-var
D-refresh
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-var' which expects a key=value pair, not a file.
Using '-auto-approve' which skips approval but does not specify variable files.
4fill in blank
hard

Fill both blanks to run Terraform apply with a plan file and skip approval.

Terraform
terraform apply [1] [2]
Drag options to blanks, or click blank then click option'
A-auto-approve
B-refresh=false
Cmyplan.tfplan
D-var-file=prod.tfvars
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the plan file after the flags.
Using '-refresh=false' which does not skip approval.
5fill in blank
hard

Fill all three blanks to apply Terraform changes with a variable file, skip approval, and disable state locking.

Terraform
terraform apply [1] [2] [3]
Drag options to blanks, or click blank then click option'
A-var-file=staging.tfvars
B-auto-approve
C-lock=false
D-refresh=true
Attempts:
3 left
💡 Hint
Common Mistakes
Using '-refresh=true' which refreshes state but does not skip approval or disable locking.
Mixing up the order of flags.