When to Use?
Last updated
When to Use?
Provisioners in Terraform should be used judiciously, primarily when other declarative options are insufficient. They're appropriate for tasks that can't be accomplished through Terraform's resource configurations or data sources. Common scenarios include running initialization scripts on newly created servers, installing software not covered by provider-specific resources, or performing one-time setup tasks. Provisioners are useful for bootstrapping configuration management tools or handling complex, stateful operations that Terraform can't manage directly. However, they should be considered a last resort due to their potential to make Terraform runs less predictable and harder to manage. Whenever possible, prefer using cloud-init scripts, custom images, or separate configuration management tools. When provisioners are necessary, design them to be idempotent and resilient to failures to maintain Terraform's desired state consistency.
Free resources to learn When to Use?
More in stage 15: Provisioners
When to Use?: common questions
Can I learn When to Use? in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain When to Use? in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this When to Use? tutorial for beginners?
It is lesson 60 of 110 in the free Terraform roadmap, in stage 15, Provisioners. If you are new to Terraform, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.