-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Description
Feature Request
Terraform Providers seem to be 95% boilerplate code, and could be generated via the OpenAPI spec along with vendor extensions and support for user-written code
Describe the solution you'd like
I would like to generate the resource and data resource schemas, and the read/create/update/delete methods based on the data in an openapi spec.
A generated provider may depend on a pre-generated go client. I'm not sure if theres any other examples in openapi-generator of a generated client depending on another generated client, or if the terraform client should just generate its own prepackaged go client.
Describe alternatives you've considered
The google and google-beta providers are already mostly auto-generated via a custom tool called Magic Modules. The tool supports generated code (with plenty of terraform-specific decorators) as well as handwritten code. However, it would be better to use OpenAPI as its a ubiquitous standard.