-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support calling resource methods #354
Comments
The simplest “raw” thing to do might be to just expose the Call concept directly (much like we do for Invoke today)?
Are there other more “sugar” options worth considering? |
Just adding a note that we would also need to add support for the above in docs gen as well: pulumi/pulumi-google-native#709 |
Maybe something like the following, where you only have to specify the resource instance and name of the method? variables:
kubeconfig:
Fn::Method:
Resource: ${someClusterResource}
Method: getKubeconfig
Arguments:
... Or, could we get fancy and grab the method out of an expression? variables:
kubeconfig:
Fn::Method:
Method: ${someClusterResource.getKubeconfig}
Arguments:
... |
For those who stumble across this particularly for GKE, you can work around it by building a kubeconfig variable and referencing that:
|
It is almost possible to call resource methods manually, as in this program which calls the "getKubeconfig" method on cluster:
However, this generates an
Invoke
, not aCall
RPC. The syntax also leaves something to be desired, with the__self__
parameter being an implementation detail that other Pulumi languages do not expose to users.The text was updated successfully, but these errors were encountered: