hashicorp / hashicorp/terraform-plugin-codegen-openapi
Mapping resource/data source definitions to multiple endpoints
- Dominant language
- Go
- Stars
- 91
- Forks
- 20
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 1
Description
### 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:
- https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Projects/operation/getProject
- https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Projects/operation/createProject
- https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Projects/operation/listProjectLimits
- https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Projects/operation/setProjectLimit
- https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Projects/operation/getProjectSettings
- https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Projects/operation/updateProjectSettings
- https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Teams/operation/listProjectTeams
- https://www.mongodb.com/docs/atlas/reference/api-resources-spec/v2/#tag/Teams/operation/addAllTeamsToProject
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
- [X] I agree to follow this project's Code of Conduct
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.