https://pulumi.com logo
Title
s

stocky-helicopter-22690

10/27/2020, 5:48 PM
Hi everyone, here a non-dev pulumi padawan (I just clarify this because I'm noob in pulumi and TS 😅) I've read above that it is possible to import an EKS cluster using @ pulumi / eks package. I'm already did this but using @ pulumi / aws (aws.cluster("name",{},{import: id}). My question is: How I can import an EKS Cluster using @ pulumi / eks package, I understand that I can use IMPORT but it's an option of CustomResourceOption and eks.Cluster is extended from ComponentResourceOptions and when I try to use import in options I get this err message:
Argument of type '{ import: any; }' is not assignable to parameter of type 'ComponentResourceOptions'.
  Object literal may only specify known properties, and 'import' does not exist in type 'ComponentResourceOptions'
😿 1
2
g

gorgeous-egg-16927

10/27/2020, 7:50 PM
I don’t think it’s possible to directly import the cluster using the EKS package, because it’s a ComponentResource (the subresources are actual cloud resources, but the top level cluster is just an abstraction). @billowy-army-68599 might have more insight here
😪 1
s

stocky-helicopter-22690

10/27/2020, 8:55 PM
Thanks Levi 🙂 do you have any advice to import the kubeconfig from an existing cluster?
g

gorgeous-egg-16927

10/27/2020, 9:33 PM
I’m not quite sure what you mean by importing the kubeconfig, but you can access any k8s cluster using the Provider resource, and setting the kubeconfig argument there. https://www.pulumi.com/docs/reference/pkg/kubernetes/provider/
👍 1