When to Use?

Contents

Roadmap info from [roadmap website](https://roadmap.sh/terraform/when to use?@CmmoshFC1dKE4y3SMN2bl)

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.


#ready #online #terraform #IaC #infrastructure