so pulumi deleted the cluster and created a new on...
# general
v
so pulumi deleted the cluster and created a new one but did not use the new provider
s
Do you have your cluster contained in a Component resource?
v
Yes
s
Also, could you provide the full namespace path of the cluster resource so I can verify which provider you're using (e.g.
aws.eks.Cluster
or
eks.Cluster
)?
Or just tell me which provider you're using. Not sure why I needed to make that more difficult than necessary. 😉
v
I am using
@pulumi/eks
another problem i have seen is that it does not recreate the aws-auth configmap on new cluster
Well i guess that is because of provider not being changed
s
There's a bug in the core engine that causes providers (and probably other
opts
) to get ignored when you wrap a multi-language component in a
pulumi.ComponentResource
. The workaround for now is to just use a function, assuming that you don't need to distribute the EKS cluster outside of the repo it's used in.
v
i think there is another problem in my code. I am making it ignore changes to kubeconfig because its always pickup as change even though there is none. https://termbin.com/01e0
s
FYI, under normal circumstances you should not have to explicitly assign the provider. Setting
parent: this
should handle that for you.
To get around the bug I referenced above RE providers in Component resources that reference multi-language components, try:
Copy code
...opts,
parent: this
v
oh thank you, i didnt know its uses provider from parents.
s
Yeah, I wish this was a little more obvious.
You can upvote and comment here to state that you're seeing the same issue with EKS: https://github.com/pulumi/pulumi/issues/10640
I may have typed the workaround wrong. See here: https://github.com/pulumi/pulumi/issues/10640#issuecomment-1239468899
v
opts...? thats a thing in ts?
s
Yeah, the spread operator. It means "apply all the attributes of this object to this other object".
v
Oh i thought spread operator could be just in the beginning like the example you given me
{...opts, parent: this}
s
I know, right? It's pretty nice the way it can go before or after and it just kinda does what you expect.
v
yes thanks to typescript for being most dynamic programming language ever.