0
0
Terraformcloud~20 mins

Why provisioners are a last resort in Terraform - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Provisioner Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why avoid provisioners in Terraform?
Which of the following is the main reason why Terraform recommends using provisioners only as a last resort?
AProvisioners can cause unpredictable failures and make infrastructure harder to manage.
BProvisioners are required for all resource creation in Terraform.
CProvisioners automatically update Terraform state without user input.
DProvisioners are the fastest way to configure resources and should always be used.
Attempts:
2 left
💡 Hint
Think about reliability and management complexity.
Architecture
intermediate
2:00remaining
Best practice alternative to provisioners
Which approach is recommended instead of using provisioners for configuring infrastructure in Terraform?
AUse provisioners for all configuration tasks.
BRun manual commands after Terraform finishes.
CUse cloud-init or configuration management tools integrated with the resource itself.
DIgnore configuration and configure resources later.
Attempts:
2 left
💡 Hint
Think about automated and reliable configuration methods.
service_behavior
advanced
2:00remaining
What happens if a provisioner fails during Terraform apply?
During a Terraform apply, if a provisioner attached to a resource fails, what is the default behavior of Terraform?
ATerraform ignores the failure and continues applying other resources.
BTerraform marks the resource as tainted and stops the apply process.
CTerraform automatically retries the provisioner until it succeeds.
DTerraform deletes the resource and does not update the state.
Attempts:
2 left
💡 Hint
Consider how Terraform handles errors to keep state consistent.
security
advanced
2:00remaining
Security risks of using provisioners
Which security risk is most associated with using provisioners in Terraform?
AProvisioners isolate resource configuration from the network.
BProvisioners encrypt all data automatically, improving security.
CProvisioners prevent unauthorized access by default.
DProvisioners may expose sensitive data in logs or scripts unintentionally.
Attempts:
2 left
💡 Hint
Think about how scripts and commands run and what they might reveal.
Best Practice
expert
3:00remaining
When is it acceptable to use provisioners in Terraform?
In which scenario is using a provisioner in Terraform considered acceptable and justified?
AWhen no native Terraform resource or external configuration tool can perform the required setup.
BFor all resource creation to ensure configuration consistency.
CTo replace cloud-init scripts for bootstrapping instances.
DTo automate manual post-deployment tasks that can be done outside Terraform.
Attempts:
2 left
💡 Hint
Consider the last resort principle and alternatives.