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

rhythmic-megabyte-99595

10/01/2023, 5:25 PM
I got SAME issue here. If I use package 'pulumi_eks' to create a cluster and disable the default providers (
disable-default-providers: *
), it seems there's no way to config the aws provider for _pulumi_eks_. The old-school way (
opts=pulumi.ResourceOptions(provider=provider
) does not work as the provider in opts here refers to the K8S provider. So I will got this error:
Copy code
Exception: Default provider for 'eks' disabled. 'eks:index:Cluster' must use an explicit provider.
ANY HELP is appreciated for this matter!!
b

billowy-army-68599

10/01/2023, 6:11 PM
this is unfortunately a bug
r

rhythmic-megabyte-99595

10/01/2023, 6:18 PM
Got it, thanks @billowy-army-68599. Do we have an ETA for the bug fix?
b

billowy-army-68599

10/01/2023, 6:22 PM
I don’t even think we have an issue, could you file an issue for it please?
r

rhythmic-megabyte-99595

10/01/2023, 6:25 PM
We got an similar issue for EKS package here, it's still open: https://github.com/pulumi/pulumi-eks/issues/835
b

billowy-army-68599

10/01/2023, 6:28 PM
that’s a different bug, please file a new one
r

rhythmic-megabyte-99595

10/01/2023, 6:38 PM
OK, will do that.
Bug filed: https://github.com/pulumi/pulumi-eks/issues/917 cc @rich-whale-93740
r

rhythmic-secretary-1287

10/02/2023, 6:38 PM
We don’t use eks provider anymore but i remember working around it assigning the provider in the format:
Copy code
providers={"eks":provider}
r

rhythmic-megabyte-99595

10/03/2023, 11:29 PM
Hi @rhythmic-secretary-1287, I still got this issue. My code is:
Copy code
eks_provider = eks.Provider("eks")
test_cluster = eks.Cluster(
        name=f"test_{cluster_name}",
      ...
        vpc_id=default_vpc.id,
        opts = pulumi.ResourceOptions(provider=eks_provider, providers={"eks":aws_provider}),
    )
And the error:
r

rhythmic-secretary-1287

10/04/2023, 1:10 AM
i think you have mixed them, you have put the
eks
one where the
aws
goes, try
Copy code
eks_provider = eks.Provider("eks")
test_cluster = eks.Cluster(
        name=f"test_{cluster_name}",
      ...
        vpc_id=default_vpc.id,
        opts = pulumi.ResourceOptions(providers={"eks":eks_provider, "aws": aws_provider}),
    )