Providers
Providers are the bridge between Netherframe and the Terraform provider ecosystem.
What A Provider Does
A provider defines how resources in a scope should talk to an infrastructure system. In practice, provider configuration usually includes:
- region
- account or subscription context
- credentials, profile, or endpoint behavior
- aliases or multiple configured instances
Where Providers Usually Live
In most Netherframe apps, providers are created inside a stack and then used by the resources in that stack.
This is usually the right default because:
- provider settings are operationally important
- stacks often map to deployment boundaries
- stack-local providers make region/account differences visible
One Provider vs Many
Use one provider per stack when:
- the stack deploys to one region/account
- simplicity matters more than flexibility
Use multiple providers when:
- the stack spans more than one region or account
- you need alias-style separation
- you want clearer ownership of distinct infrastructure domains
Typed Providers vs Raw Providers
Netherframe supports both:
- raw provider/resource declarations
- generated typed provider packages
Generated packages are usually better for user-facing code because they give:
- clearer imports
- better autocomplete
- fewer stringly-typed resource declarations
Provider Scope Matters
Provider choice is not just implementation detail. It affects:
- which credentials are used
- which region or endpoint is targeted
- how readers understand the stack
That is why provider setup should usually remain explicit in stack code rather than being hidden too deeply.