Open blaargh opened 9 months ago
Additional Info:
Using helm.Release and dependsOn instead of dependsOnInputs doesn't work either. As this helm chart is for deployment of an ALB resource on AWS (via Ingress with annotations), I also tried fetching the ALB directly with lb.LookupLoadbalancer and dependsOn, but it also doesn't work.
In the meantime, I also updated all relevant libraries (pulumi, pulumi-aws, pulumi-kubernetes) to their latest version, which didn't help either.
Thanks for filing this @blaargh. As indicated in the docs for kubernetes.helm.sh.v3.Chart | Pulumi Registry; using dependsOnInputs
with chart.Ready
is the recommended approach. Unfortunately, I think the issue here is that the the preview step is failing because it attempts to do the read even though the chart has not been deployed yet (because we're still in preview!).
As a workaround for now, you might try pulumi update --skip-preview
to skip the preview step and see if it successfully deploys the chart and finds the ingress.
Thanks for acknowledging the issue! For now, I moved the creation of this resource in its own project, and just assume its there and ready in other projects. This forces me to have an order of precedence when applying all projects, but that's no issue. I'd rather have the preview actually do stuff like lookups, instead of the Terraform alternative, where nothing happens during a plan, which leads to much worse workarounds.
Still, would be great if preview was able to respect all variations of dependsOn in the future.
@blaargh has wise words on the tradeoff between accuracy and convenience in preview.
What happened?
The
dependsOnInput(chart.Ready)
does not have the expected effect on Get calls.The example errors during the preview with
error: Preview failed: resource 'namespace/ingress' does not exist.
I see in the documentation it works with creating new resources, is it not supposed to work with a lookup? Or am I doing something wrong?
Example
Output of
pulumi about
CLI Version 3.102.0 Go Version go1.21.6 Go Compiler gc
Plugins NAME VERSION archive 0.0.3 aws 6.0.2 go unknown kubernetes 4.6.1
Host OS darwin Version 14.2.1 Arch arm64
This project is written in go: executable='/usr/local/go/bin/go' version='go version go1.21.5 darwin/arm64'
Current Stack: stack Found no resources associated with stack
Found no pending operations associated with stack
Backend Name https://pulumi-api.io URL User user Organizations user, org Token type personal
Dependencies: NAME VERSION github.com/pulumi/pulumi-aws/sdk/v6 6.0.2 github.com/pulumi/pulumi-kubernetes/sdk/v4 4.6.1 github.com/pulumi/pulumi/sdk/v3 3.96.2 gopkg.in/yaml.v2 2.4.0
Pulumi locates its logs in /var/folders/z6/f71rd_rj49b6vf2qf_kfth7c0000gn/T/ by default
Additional context
No response
Contributing
Vote on this issue by adding a š reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).