https://pulumi.com logo
#general
Title
# general
b

bored-barista-23480

11/10/2021, 3:50 PM
I am using the
pulumi_eks
package to set up an EKS cluster in a project. I have to import the cluster in a second project and ran into a problem:
pulumi_eks.Cluster
does not provide a
get()
method. Under the hood there is a child resource of type
pulumi_aws.eks.Cluster
with a static
get()
method but it does not work ,Pulumi can't find it. Did I miss something or is there no way of importing the cluster if using the
pulumi_eks
package to deploy it?
d

delightful-gigabyte-39334

11/10/2021, 3:56 PM
I use the
pulumi_eks
package to deploy eks, and in another stack I am able to get the cluster with:
cluster = aws.eks.get_cluster(cluster_name)
this is from the
pulumi_aws
package
b

bored-barista-23480

11/10/2021, 4:02 PM
But this has type
Output[GetClusterResult]
not
Cluster
.
I think I at least found the reason why
pulumi_aws.eks.Cluster.get()
fails: Pulumi looks for the resource in the current stack. But there is no option to set the stack either - so I'm pretty much back at the start.
2 Views