0
0
Terraformcloud~10 mins

Terraform taint and untaint (deprecated) - Interactive Code Practice

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

Complete the command to mark a Terraform resource as needing replacement.

Terraform
terraform [1] aws_instance.example
Drag options to blanks, or click blank then click option'
Aapply
Bplan
Cdestroy
Dtaint
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' instead of 'taint'.
Using 'destroy' which deletes the resource immediately.
Using 'plan' which only shows changes.
2fill in blank
medium

Complete the command to remove the taint mark from a Terraform resource.

Terraform
terraform [1] aws_instance.example
Drag options to blanks, or click blank then click option'
Auntaint
Binit
Cvalidate
Drefresh
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'refresh' which updates state but does not remove taint.
Using 'validate' which checks configuration syntax.
Using 'init' which initializes Terraform.
3fill in blank
hard

Fix the error in the command to taint a resource named 'web_server'.

Terraform
terraform [1] web_server
Drag options to blanks, or click blank then click option'
Auntaint
Bapply
Ctaint
Dplan
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'untaint' which removes the mark.
Using 'apply' which applies changes but does not mark.
Using 'plan' which only previews changes.
4fill in blank
hard

Fill both blanks to complete the command that taints a resource and then applies changes.

Terraform
terraform [1] aws_instance.example && terraform [2]
Drag options to blanks, or click blank then click option'
Ataint
Bapply
Cplan
Ddestroy
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'plan' instead of 'apply' to apply changes.
Using 'destroy' which deletes resources immediately.
Reversing the order of commands.
5fill in blank
hard

Fill all three blanks to untaint a resource, refresh state, and then apply changes.

Terraform
terraform [1] aws_instance.example && terraform [2] && terraform [3]
Drag options to blanks, or click blank then click option'
Auntaint
Brefresh
Capply
Dplan
Attempts:
3 left
💡 Hint
Common Mistakes
Skipping the refresh step.
Using 'plan' instead of 'apply' to apply changes.
Using 'taint' instead of 'untaint' to remove the mark.