Product Updates
Terraform
Terraform provider generation feature bonanza
We’re excited to announce three significant improvements to Terraform provider generation that bring it closer to SDK generation parity. These features eliminate manual workarounds, reduce code duplication, and provide a cleaner developer experience for Terraform users.
🌐 Provider-level globals
Define common configuration values once at the provider level instead of repeating them across every resource.
What it solves
Before globals support, Terraform providers required manual coding to handle provider-level configuration like region settings or organization IDs. There was no clean workaround — teams had to implement custom solutions or accept repetitive configuration across resources.
Terraform consumers can choose the appropriate style of configuration for their use case:
- Per-resource: Same as before.
- Provider-only: Configure once at the provider level for all resource configurations.
- Provider with per-resource overrides: Configure the provider level with a default value while a resource level value will override.
How it works
Globals use the same Speakeasy globals extension as SDK generation, ensuring consistency across all generated code. Simply add x-speakeasy-globals
to your OpenAPI specification:
This generates clean provider-level configuration in your Terraform blocks:
📄 Automatic pagination handling
Terraform data sources now handle paginated API responses automatically behind the scenes.
What it solves
Previously, pagination handling was incomplete, requiring manual data resource creation. Paginated results are now fully handled and unnecessary pagination details are hidden from consumers.
How it works
Using the same Speakeasy pagination extension as SDK generation, providers automatically handle all pagination types:
- Cursor-based pagination
- Offset/limit pagination
- Page-based pagination
Before pagination support, users had to manually handle paging:
After pagination support, it’s seamless:
🔗 Server URL variables
Configure server endpoints dynamically with support for environment-specific hostnames and region-specific endpoints.
What it solves
Previously, Terraform providers had limited server URL customization options. Teams couldn’t easily switch between staging and production environments or configure region-specific endpoints without manual modifications.
How it works
Server URL variables provide the same functionality as SDK generation, with full OpenAPI server URL variable support:
This generates provider-level configuration with environment variable support:
🚀 Bringing Terraform generation to parity
All three features use the same extensions as SDK generation, ensuring consistency across your entire API ecosystem. This represents a significant step toward feature parity between SDK and Terraform provider generation.
Key benefits
- DRY configuration: Define common values once with globals
- Seamless data access: Automatic pagination eliminates manual handling
- Environment flexibility: Server URL variables support any deployment scenario
- Consistent tooling: Same extensions work across SDKs and Terraform providers
- No breaking changes: All features are additive and backward-compatible
Getting started
These features for Terraform provider generation are available now. Update your OpenAPI specifications with the appropriate extensions and regenerate your providers to take advantage of these improvements.
Next steps
Ready to enhance your Terraform providers? Check out our documentation for implementation details:
These improvements eliminate common pain points and provide a more polished experience for both provider developers and end users. We’re committed to continuing this progress toward full feature parity between SDK and Terraform provider generation.