https://pulumi.com logo
l

limited-rainbow-51650

02/24/2020, 1:51 PM
I have a pulumi Kubernetes namespace. I deploy a Helm chart via Pulumi and afterwards want access to one of the resources. I use
chart.getResource("v1/Service, mynamespace.metadata.name, "my-service")
in my code to get access to the service resource, but this doesn’t seem to work because the namespace needs to be a
string
, not an
Output
. How can I get the string the pulumi way? I tried with
mynamespace.metadata.name.apply(value => +value)
but that didn’t work.
b

better-rainbow-14549

02/24/2020, 2:27 PM
you can only use it within the apply handler
Copy code
mynamespace.metadata.name.apply(x => chart.getResource("", x, "")
👍🏼 1
4 Views