clean-london-20458
07/04/2024, 12:06 PMCannot 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?clean-london-20458
07/04/2024, 12:07 PMlittle-cartoon-10569
07/04/2024, 8:23 PMgetOutput()
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.clean-london-20458
07/05/2024, 6:57 AMclean-london-20458
07/05/2024, 6:57 AMclean-london-20458
07/05/2024, 6:57 AM