Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

common pulumi boilerplates should have a educational example of .apply() #592

Open
3 tasks
dixler opened this issue Jun 6, 2023 · 0 comments
Open
3 tasks
Labels
kind/enhancement Improvements or new features

Comments

@dixler
Copy link
Contributor

dixler commented Jun 6, 2023

Hello!

  • Vote on this issue by adding a 馃憤 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

apply() is a hard concept. Including an example of working with applies in templates in a minimal way would be helpful for new users. Examples of the following I think would be very helpful:

  • chaining an apply
  • using an apply's output an argument to a resource
  • pulumi.all

Freehanding this example so it may have mistakes.

new FooResource("foo", {
    bar: bar.id,
    bazPlus2: baz.count.apply(count => count + 1).apply(countPlus1 => countPlus1 + 1),
    barbaz: pulumi.all([bar.id, baz.id]).apply(([barId, bazId]) => someFoo(barId, bazId)),
});

Affected area/feature

@dixler dixler added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Jun 6, 2023
@dixler dixler changed the title common pulumi boilerplates should have a contrived example of .apply() common pulumi boilerplates should have a educational example of .apply() Jun 6, 2023
@scottslowe scottslowe removed the needs-triage Needs attention from the triage team label Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

2 participants