Closed dikhan closed 3 years ago
This is already supported using the ProviderOpenAPI struct CreateSchemaProviderFromServiceConfiguration function which accepts any struct that implements the ServiceConfiguration interface such as the ServiceConfigV1 struct. Hence, closing this issue.
Is your feature request related to a problem?
As Service provider I want to use the OpenAPI Terraform provider as a library and be able to configure it directly through code. Currently the provider is only configurable either via environments variables or an external config file as described in Using the OpenAPI Terraform provider So that I can create my own custom terraform provider (powered by the OpenAPI Terraform library) and be able to register it with the Terraform Registry
Describe the solution you'd like
I would like to be able to create a openapi.ProviderOpenAPI{} struct passing in the providerName and the OpenAPIURL and have the provider returned a Terraform *schema.Provider that then I can use in my custom terraform provider but instead of writing an entire provider to my API I just delegate that responsibility to the OpenAPI Terraform provider and as a service provider I only need to take care of the API and its documentation and make sure it's compliant with the OpenAPI Terraform provider requirements.
Acceptance criteria
What's required to consider this feature request complete?
Example:
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Checklist (for admin only)
Don't forget to go through the checklist to make sure the issue is created properly: