Per-resource security and server URLs in Terraform providers
Blog post from Speakeasy
Large infrastructure companies often face challenges managing multiple APIs under a single platform, as each API may require its own endpoint and credentials. Traditionally, Terraform's configuration model only offered global provider settings and individual resource settings, necessitating the creation of separate providers or custom code to handle complexities. However, with the introduction of per-resource security and server URLs in Terraform provider generation, users can now configure resource groups with their own endpoints and credentials within a single provider. This feature, which leverages the OpenAPI specification's operation-level security and server definitions, simplifies Terraform configurations by eliminating the need for multiple providers and complex codebases. It is especially beneficial for architectural patterns that separate control and data plane APIs, such as admin and data APIs, multi-tenant infrastructures, cluster-based systems, and database platforms. This new approach allows users to manage resources with distinct endpoints and authentication requirements more efficiently, reducing the complexity typically associated with managing multiple Terraform providers.