pulumi / pulumi

Pulumi - Infrastructure as Code in any programming language 🚀
https://www.pulumi.com
Apache License 2.0
21.61k stars 1.11k forks source link

Feature request: OpenAPI Spec/Postman Collection to Pulumi Provider Conversion Tool #5198

Open haneef95 opened 4 years ago

haneef95 commented 4 years ago

Hi,

Many API endpoints now provide a Postman Collection, Swagger 2.0 or OAS 3.0 specs to make their software easily 'pluggable'.

It would be good if those premade specs can be converted into Pulumi providers using a converter tool. And it would help deliver API updates to a provider quicker.

OAS specifications do make resource definitions easier.

Food for thought

API Specs like the ones mentioned above are to complete individual actions, however Pulumi works on a CRUD model.

So, I guess there has to be grouping/mapping into CRUD actions. Maybe an OpenSource Spec to do the mappings?

Thanks, Haneef

rienafairefr commented 3 years ago

I was looking exactly for this, and it's missing :-(

Related, I saw recently that the pulumi google-native provider kind of works that way: the googleapis discovery document is converted to a pulumi provider. (cf https://github.com/pulumi/pulumi-google-native) The discovery document is not an openapi doc (its a google spec), but it's the same idea. Maybe we could have a bridge [openapi spec]=>[discovery doc]=>[pulumi provider] but it's a stretch.

Also, a bridge through terraform https://github.com/dikhan/terraform-provider-openapi might be feasible

AaronFriel commented 1 year ago

We're tracking this issue in the new Go provider SDK here: https://github.com/pulumi/pulumi-go-provider/issues/67

haneef95 commented 1 year ago

Here's one for Terraform

https://github.com/dikhan/terraform-provider-openapi

Could pulumi-terraform be used to make use of this package above?