pulumi-eks
pulumi-eks copied to clipboard
Cluster.name not available as an output
A Python Pulumi program that references eks.Cluster.name in the definition of a Helm chart causes pulumi preview to generate spurious diffs. I originally thought this was an issue with the Kubernetes provider, but after much hand wringing I believe the actual issue is that eks.Cluster is a remote component in Python, and so the value of eks.Cluster.name is not available at preview time.
Expected behavior
pulumi preview reports no diffs.
Current behavior
pulumi preview reports the deletion of all resources created by the Helm chart, but pulumi up will correctly leave those resources in place.
Steps to reproduce
I put together a repository with reproduction instructions:
https://github.com/benesch/pulumi-bug
There's also an easy workaround in this case, which is to not reference eks.Cluster.name in the Helm chart, and instead extract a simple string literal that can referenced in the inputs of the EKS cluster and the Helm chart: https://github.com/benesch/pulumi-bug/pull/1/files
Affected feature
Remote components, I think?
@justinvp Could you take a look?
To add to this issue, the actual value of cluster.Name() doesn't appear to be available in the Go SDK
FWIW, the reason this doesn't work correctly is because name isn't actually an output of Cluster. We'd need to add it as an output in the schema and propagate the value when registering the component's outputs / returning its state.