Hey folks, I get the error `Exception: 'dependsOn'...
# general
b
Hey folks, I get the error
Exception: 'dependsOn' was passed a value that was not a Resource.
, but I don't explicitly set the
dependsOn
parameter. I boiled it down to one specific parameter creating the problem. I create an EKS cluster in my first project, export
cluster.core
, import it in my second project and use it as the
cluster
input to a
ManagedNodeGroup
. Currently it's the only resource created in the second project and every other input is given explicitly (= not as an
Output
type). Does any one have a clue where the error could originate or even how to solve it?
It's essentially the same as in this example: EKS ManagedNodeGroup. The difference is, that I'm creating cluster and node group in separate projects, having an export-import in between.
l
I'm afraid you're not going to be able to do that using only export and stack references. You don't get a "real" Pulumi-managed resource that way.
You'll need to export the ID of the resource in one project, and use that to
get()
the resource in the other project.
The object that comes back from
get()
is a real Pulumi resource (though, read only).
b
Thank you very much! Seems like I misunderstood the export-import functionality. Which
get()
function do you mean exactly? I only found
aws.eks.get_cluster()
but that does not give me the full resource (specifically the
core
attribute is missing). But I also don't want to import the resource to be managed by the second project.