-
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
Introduce fn::method
function for resource methods
#431
base: main
Are you sure you want to change the base?
Conversation
call
attribute for resource methodsfn::call
function for resource methods
It would be great if you could write up which syntax you have implemented, as there were several suggestions on the original issue. A test would likewise make the desired behavior clearer. One thing comes to mind immediately. We have |
Yeah, I wouldn't expect we'd allow users to pass these. It should be passed along from the resource itself. |
9c117e5
to
6696cef
Compare
fn::call
function for resource methodsfn::method
function for resource methods
fn::method
function for resource methodsfn::call
function for resource methods
3eda986
to
c6ea6c0
Compare
@AaronFriel update:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resource methods will need to be type checked, along with their arguments.
@aq17 unfortunately that will require extending the It looks like due to a fluke or naming mistake, that interface uses a method named @justinvp what do you think? |
This is pulumi/pulumi#8328 (Yes, it is unfortunate that the mock name for invokes is The alternative is doing more design work to have a separate method in the mock just for |
7f77fb3
to
549032d
Compare
fn::call
function for resource methodsfn::method
function for resource methods
👋 any updates on this, bumping into this in the context of https://github.com/t0yv0/pulumi-12709 which special cases for single-value Resource returning methods, and YAML is part of the requirement. CC @lblackstone It sounds like there's no current workaround to call the methods in YAML, it just is not possible. Considering options here, any potential workarounds or perhaps would it be feasible for me to pick up this PR and bring it to completion. I haven't contributed to this codebase yet but can get ramped up if needed. That's an option.. I can quickly look at the possibility if YAML can pass an |
Getting this in would make testing |
Fixes #354
Allows resource methods to be called via
fn::method
, using the following syntax:Both the full function type token or just the function name may be used