Process Flow - Why provisioners are a last resort
Start Terraform Apply
Create Resource
Check if Provisioner Needed?
No→Finish
Yes
Run Provisioner Script
Provisioner Success?
No→Error: Fail Apply
Yes
Finish
Terraform creates resources first, then runs provisioners only if needed. If provisioners fail, the apply fails, so they are used only as a last step.