icy-nest-77417
06/29/2021, 6:34 PMcreate
, delete
, update
operations for that service (it is a simple CRUD API for managing a single internal resource)). The important part is that we want developers there to be able to import the plugin from a package manager, and then interact with our custom resource service without any hurdle.
I've found 2 or 3 solutions online for this use case so far:
1. Pulumi Packages
2. Dynamic Providers
In the last days, I tried to clone the TypeScript component package boilerplate and added an update
member in the provider class. However, after compiling the code, only the construct
member seems to be taken into consideration when using pulumi up
or pulumi preview
, which is not enabling me to support the CRUD nature of our internal service. I've found on Github multiple classes implementing the pulumi.ProviderResource
interface, but in all of them, only the construct
member is defined (i.e. not the update
member), which makes me think this is not the right tool for my use case.
We're trying to move away from Terraform, so the bridge solution described in the Packages documentation page doesn't seem appropriate either.
I've also considered using a Dynamic Provider instead of the former TypeScript boilerplate. My idea was to simply put the classes implementing the pulumi.dynamic.ResourceProvider
and pulumi.dynamic.Resource
interfaces in a package manager. I wonder whether there are any major issue with this approach, other than the source code not scaling to more than one language (we would prefer to support more languages than just TypeScript, but it is not a hard requirement).
What is the best way to support our custom CRUD service? I have listed some possible directions above, but I'm lacking pointers. I'm not sure why, but there doesn't seem to exist a lot of documentation about this topic online. Any help would be very appreciated! Also, if I am unaware of a more suitable solution for this case, please don't hesitate to let me know.red-match-15116
07/01/2021, 9:04 PM