Test Terraform variable validation before a plan reaches a provider
A Terraform variable declaration is often treated as a convenience for making a module reusable. It is also an input boundary. A value can have the right HCL syntax and still be unsuitable for the module: a replica count of zero, a fractional capacity, or a string where an API expects a number. If that condition is left to a resource argument or a provider API, the failure can arrive after Terraform has initialized providers, read state, or started to construct a larger plan.