This message was deleted.
s
This message was deleted.
c
Can you point us to the example that you are looking at? Have you seen this where there is no use of providerCredentialOpts Can you share the code where this error is happening?
s
Copy code
const vpcName = "k8s-ue2-dev";
const vpc = new awsx.ec2.Vpc(vpcName, {
  tags: { Name: vpcName },
});

const cluster = new eks.Cluster("myCluster", {
  // This works, but if I remove the `providerCredentialOpts I get the above error
  providerCredentialOpts: {},
  roleMappings: [
    // Provides full administrator cluster access to the k8s cluster
    {
      groups: ["system:masters"],
      roleArn: clusterAdminRole.arn,
      username: "pulumi:admin-usr",
    },
    // Map IAM role arn "AutomationRoleArn" to the k8s user with name "automation-usr", e.g. gitlab CI
    {
      groups: ["pulumi:automation-grp"],
      roleArn: automationRole.arn,
      username: "pulumi:automation-usr",
    },
    // Map IAM role arn "EnvProdRoleArn" to the k8s user with name "prod-usr"
    {
      groups: ["pulumi:prod-grp"],
      roleArn: envProdRole.arn,
      username: "pulumi:prod-usr",
    },
  ],
  vpcId: vpc.id,
  publicSubnetIds: vpc.publicSubnetIds,
  privateSubnetIds: vpc.privateSubnetIds,
  instanceType: "t2.small",
  desiredCapacity: 2,
  minSize: 2,
  maxSize: 2,
});
This is my whole configuration for the eks cluster. I managed to create it by adding an empty
providerCredentialOpts
, but i’m not sure if this is what I should be doing
c
I added the name you set as part of the cluster name So changed the instance type to t3a.small. These are newer and cheaper. Check here I commented out the role mappings because I didn’t have that information. I changed the maxSize to be 1 more than the min size. I removed the
providerCredentialOpts
completely. cluster link: https://share.getcloudapp.com/12uKwKq5