Recall & Review
beginner
What is a provisioner in Terraform?
A provisioner is a way to execute scripts or commands on a resource after it is created, like running setup tasks on a server.
Click to reveal answer
beginner
Why should provisioners be used only as a last resort?
Because they can cause unpredictable results, make infrastructure harder to manage, and break Terraform's ability to track resource state cleanly.
Click to reveal answer
intermediate
What problems can arise from using provisioners in Terraform?
Provisioners can fail silently, cause delays, or lead to inconsistent infrastructure states if the commands don't run as expected.
Click to reveal answer
intermediate
What is a better alternative to using provisioners for configuring resources?
Use configuration management tools like Ansible, Chef, or cloud-init scripts that run independently from Terraform to manage resource setup.
Click to reveal answer
advanced
How does Terraform's declarative approach conflict with provisioners?
Terraform declares desired infrastructure state, but provisioners run imperative commands that can cause side effects outside Terraform's control.
Click to reveal answer
What is the main reason to avoid using provisioners in Terraform?
✗ Incorrect
Provisioners can cause unpredictable infrastructure states because they run commands outside Terraform's normal state management.
Which tool is recommended instead of Terraform provisioners for configuring servers?
✗ Incorrect
Ansible is a configuration management tool that is better suited for server setup than Terraform provisioners.
Provisioners in Terraform run at which point in the resource lifecycle?
✗ Incorrect
Provisioners run commands after the resource has been created.
What is a key downside of provisioners related to error handling?
✗ Incorrect
Provisioners may fail silently or cause delays, making troubleshooting harder.
Terraform's declarative model means:
✗ Incorrect
Terraform focuses on declaring the desired state, not the exact steps to reach it.
Explain why Terraform provisioners should be considered a last resort and what risks they introduce.
Think about how provisioners affect Terraform's ability to track infrastructure state.
You got /5 concepts.
Describe safer alternatives to using provisioners for configuring infrastructure resources.
Consider tools designed specifically for server setup and configuration.
You got /4 concepts.