Terraform Advanced — When to Build a Provider

less than 1 minute read

A decision framework for building custom providers.


Build a Provider When

✅ Your company has an internal API not covered by any provider
✅ The official provider is missing a resource you need
✅ You need to manage non-cloud resources (databases, internal tools)
✅ You want to enforce company standards via custom resource types

Don’t Build a Provider When

❌ A community provider already exists — check the registry first
❌ A simple API call suffices — use the http or restapi provider
❌ A shell script works — use the shell provider or local-exec
❌ The feature is coming soon in the official provider

Decision Tree

Need to manage resource via Terraform?
├── Official provider has it? → Use it
├── Community provider? → Evaluate quality, then use
├── Simple REST CRUD? → terraform-provider-restapi
├── One-off script? → null_resource + local-exec
└── Complex, reusable? → Build custom provider

What’s Next?

Understand how providers work internally.

← Custom Providers Provider Architecture →

Updated: