Hi all, I am getting a strange error running below code: `Cannot convert undefined or null to object...
c
Hi all, I am getting a strange error running below code:
Cannot convert undefined or null to object
If I do for example scope.apply(x => console.log(x)) before creating this role assignment, I am getting the right value, but the moment it goes to scope it is null or undefined. What could be the potential problem?
Where state is a terraform remote state
l
What does "Terraform remote state" mean? Is
getOutput()
a Terraform method in this code? It looks like a Pulumi method. What type of object is
state
? Is it a StackReference? I'm not aware of any way for a StackReference output to fail to resolve itself during resource deployment, but that's not to say it's impossible.
getOutput()
is being called during the creation of your resource tree, but its
apply()
method isn't being called until the Pulumi engine starts doing its thing. In theory, if Outputs created by
state.getOutput()
get their concrete value via an object that goes out of scope before the Pulumi engine calls
apply()
, then you might see this message. I never have, though, so this is a complete guess.
c
Nevermind, it's all resolved
Minor difference with the name in two env 🫠
But thanks for your help