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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulumi.DependsOn should allow dependencies on Output #7429

Closed
irl-segfault opened this issue Jul 6, 2021 · 1 comment
Closed

pulumi.DependsOn should allow dependencies on Output #7429

irl-segfault opened this issue Jul 6, 2021 · 1 comment
Labels
kind/enhancement Improvements or new features resolution/duplicate This issue is a duplicate of another issue

Comments

@irl-segfault
Copy link

irl-segfault commented Jul 6, 2021

Hi all.

Go currently does not support dynamic providers, which means I cannot implement custom resources. I have a use case which is described by the following pseudo-code:

resource1 := pkg.NewResource(...)

output2 := resource1.output1.ApplyT(func(s) bool { 
    // make API calls to external service
    return true
  })
resource2 := pkg.NewResource(..., pulumi.DependsOn(output2))
                                                                                                          ^ arg requires pulumi.Resource

In this case, I need to make API calls to some external service, and I want those calls to be a pre-requisite of creating any subsequent resources. In order to do this, I can return a BoolOutput from the ApplyT call, but I have no way of injecting this Output into the dependency graph.

If Go had support for dynamic providers, it's possible I could wrap this in a custom resource.

In general, I feel like Pulumi users should be able to express dependencies on any awaitable value or asynchronous task, instead of only resources managed by Pulumi. To me, this is a killer feature of Pulumi vs. something like Terraform.

@irl-segfault irl-segfault added the kind/enhancement Improvements or new features label Jul 6, 2021
@lukehoban lukehoban added the resolution/duplicate This issue is a duplicate of another issue label Jul 7, 2021
@lukehoban
Copy link
Member

This is tracked in #2545 and #3972. Will close this out to continue tracking there. Feel free to add additional notes on use cases there if not already covered in that issue.

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 resolution/duplicate This issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

2 participants