0
0
Terraformcloud~5 mins

Why provisioners are a last resort in Terraform - Quick Recap

Choose your learning style9 modes available
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?
AThey are faster than other methods
BThey automatically fix errors
CThey are required for all resources
DThey can cause unpredictable infrastructure states
Which tool is recommended instead of Terraform provisioners for configuring servers?
AAnsible
BTerraform provisioners
CManual SSH commands
DDocker Compose
Provisioners in Terraform run at which point in the resource lifecycle?
ADuring resource deletion
BBefore resource creation
CAfter resource creation
DBefore plan execution
What is a key downside of provisioners related to error handling?
AThey may fail silently or cause delays
BThey always fix errors automatically
CThey prevent resource creation
DThey improve Terraform speed
Terraform's declarative model means:
AYou manually configure each resource
BYou declare what you want, not how to do it
CYou write scripts to run commands step-by-step
DYou must use provisioners for all resources
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.