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
little-cartoon-10569
11/09/2021, 7:10 PM
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.
little-cartoon-10569
11/09/2021, 7:11 PM
You'll need to export the ID of the resource in one project, and use that to
get()
the resource in the other project.
little-cartoon-10569
11/09/2021, 7:12 PM
The object that comes back from
get()
is a real Pulumi resource (though, read only).
b
bored-barista-23480
11/10/2021, 2:24 PM
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.
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.