Hey, we are trying to disable default provider for EKS, when setting in Pulumi config ``` pulumi:di...
m
Hey, we are trying to disable default provider for EKS, when setting in Pulumi config
Copy code
pulumi:disable-default-providers: ["*"]
we are getting
Copy code
error: Default provider for 'eks' disabled. 'urn:pulumi:sandbox::aws-eks:***aws-eks$***:cluster$eks:index:Cluster$eks:index:VpcCni::aws-eks-sandbox-***-eksCluster-vpc-cni' must use an explicit provider.
but based on the library, thereโ€™s no even an option to create custom EKS provider in order to disable default one. Does someone tried to disable default EKS provider, and if so, how you did it?
FYI @astonishing-tent-18728
l
Is it different to the AWS one?
Try instantiating an AWS provider and passing that to the
provider
opt.
a
it looks like its different, usually the error is saying aws in the provider name
i did didnt work
still complains that eks provider not found
l
Ok, pass it to the
eks
element of
providers
instead.
Although.. CustomResourceProviderOpts doesn't have providers.. that's a bummer.
a
to confuse it more https://www.pulumi.com/registry/packages/eks/api-docs/provider/ this doesnt exist on the package 2.7.7
how
l
Under the hood, the provider should be the AWS one. But it'll be looking it up by the wrong key, I'm betting. And you can't override the key for CustomResource instances, only for ComponentResource instances.
a
i commented on it at the end with the code
i do pass it but its complaining the vpc cni is missing the default provider
l
Maybe it's a regression? That issue and PR linked look like exactly what you're hitting.
Though they are talking about
providers
, which implies a component resource...
a
you can pass providers down to customCompoentn too
Copy code
...
   protect?: boolean;
    provider?: ProviderResource;
    replaceOnChanges?: string[]; 
...
a
provider
l
Yes. That's a single provider. Look at component resource opts:
Copy code
...
    provider?: ProviderResource;
    providers?: Record<string, ProviderResource> | ProviderResource[];
    replaceOnChanges?: string[]; 
...
a
Copy code
constructor(name: string, args: clusterArgs, opts?: pulumi.ComponentResourceOptions) {
acually im passing componentResourceOptions
l
If your resource is using that, great. But the Cluster resource uses CustomResource.
a
image.png
thats the pulumi cluster code
l
Then their API docs need updating ๐Ÿ™‚
q
Sorry you're running into this! I'll have a look ๐Ÿ‘€
This turned out to be a bug in pulumi-eks. I opened https://github.com/pulumi/pulumi-eks/issues/1294 and added a workaround using EKS addons (which is also the long term strategy we're aiming for with the provider). @little-cartoon-10569 I also found the reason why the docs are wrong and opened an issue for that as well: https://github.com/pulumi/pulumi/issues/16928. Thanks for pointing this out!
๐Ÿ™ 1
๐Ÿ‘ 1