purple-smartphone-26653
03/27/2024, 2:53 PMCustomResource
?
We're using code like the following to provision a custom resource. The issue that we're seeing is that foo.status
is not defined so we cannot .apply()
on it.
foo = CustomResource(
"foo-sslcerts",
api_version="<http://networking.gke.io/v1|networking.gke.io/v1>",
kind="ManagedCertificate",
metadata={
"name": "foo-sslcerts",
"annotations": {"<http://pulumi.com/patchForce|pulumi.com/patchForce>": "true"},
},
spec={
"domains": ["<http://www.foo.net|www.foo.net>"],
},
)
...
bar = CustomResource(
"bar-sslcerts",
api_version="<http://networking.gke.io/v1|networking.gke.io/v1>",
kind="ManagedCertificate",
metadata={
"name": "bar-sslcerts",
"annotations": {"<http://pulumi.com/patchForce|pulumi.com/patchForce>": "true"},
},
spec={
"domains": foo.status.apply(lambda x: compute_bar_domains(x)),
},
)
This happens despite "status"
showing up in the "outputs"
section of the state file for the foo-sslcerts
resource. That is, if we remove the entire bar
section, run pulumi up
, and then run pulumi stack export
we can see the outputs for foo-sslcerts
, which include "status"
.
This is with pulumi==3.111.1
and pulumi-kubernetes==4.9.1
.