hashicorp / terraform-plugin-codegen-openapi

OpenAPI to Terraform Provider Code Generation Specification
Mozilla Public License 2.0
48 stars 6 forks source link

Mapping resource/data source definitions to multiple endpoints #126

Open AgustinBettati opened 5 months ago

AgustinBettati commented 5 months ago

Use Cases or Problem Statement

We have some resource and data source definitions which rely on multiple endpoints to handle all the attribute definitions. An example of this is a project resource https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/project which makes use of several endpoints:

I understand that having a resource rely on multiple API CRUD operations has its tradeoffs, but this form of abstraction can be present in resource and data source implementations.

Proposal

Currently a resource or data source is defined by a single set of CRUD operations (https://developer.hashicorp.com/terraform/plugin/code-generation/openapi-generator#resources). Wanted to know if the possibility of mapping multiple endpoints was contemplated or seen as a possible feature moving forward.

Additional Information

No response

Code of Conduct