Skip to content

[REQ] Terraform Provider client generator #15889

@jasondamour

Description

@jasondamour

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.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions