Thread
#aws
    w

    wide-finland-25364

    7 months ago
    Are m6a instances not supported by Pulumi? Seems like I could select m6a instance types when I manually create nodes for EKS clusters using AWS Console.
    d

    delightful-gigabyte-39334

    7 months ago
    are you sure your using the same region in pulumi vs the aws console? m6a is iirc only available for a few regions
    i ran into something similar trying to spin up an m6a in another region that wasnt supported
    w

    wide-finland-25364

    7 months ago
    yeah I use
    us-west-2
    . I selected the region when I created the project. Do I have to specify in the code as well?
    d

    delightful-gigabyte-39334

    7 months ago
    if your using the default provider it should be from that, you can check the stack settings yaml to double check its the right one there.
    w

    wide-finland-25364

    7 months ago
    yeah everything looks correct
    tags: { name: current_cluster_name + "-cluster" },
      vpcId: vpc.id,
      publicSubnetIds: vpc.publicSubnetIds,
      privateSubnetIds: vpc.privateSubnetIds,
      skipDefaultNodeGroup: true,
      instanceRoles: [role2],
      instanceType: "t3a.small",
      desiredCapacity: 2,
      minSize: 2,
      maxSize: 4,
      nodeRootVolumeSize: 50,
      createOidcProvider: true,
      userMappings: userMappings
    should I add anything else here?
    yeah I'm drilling down
    instanceType
    and I don't see m6a. hmm...
    d

    delightful-gigabyte-39334

    7 months ago
    yeah is this the awsx package? i wonder if thats whats checking on it.
    w

    wide-finland-25364

    7 months ago
    import * as eks from "@pulumi/eks";
    eks.Cluster
    and
    eks.ClusterOptions
    d

    delightful-gigabyte-39334

    7 months ago
    yeah im not sure on that, hopefully someone familiar with that package can chime in, or maybe check the github repo to see if there is an option issue on it.
    b

    bored-table-20691

    7 months ago
    What error are you getting?
    w

    wide-finland-25364

    7 months ago
    pulumi won't understand the instanceType of
    m6a.large
    and every other m6a instances
    (property) ClusterOptions.instanceType?: pulumi.Input<aws.ec2.InstanceType> | undefined
    The instance type to use for the cluster's nodes. Defaults to "t2.medium".
    
    Type '"m6a.large"' is not assignable to type 'Input<InstanceType> | undefined'. Did you mean '"m5a.large"'?ts(2820)
    cluster.d.ts(251, 5): The expected type comes from property 'instanceType' which is declared here on type 'ClusterOptions'
    m6a is relative new instance type which went to GA in December
    f

    faint-table-42725

    7 months ago
    Ultimately, the underlying code will pass this through as a string, so you can ignore the type declarations here as a workaround
    (via
    // @ts-ignore
    )
    b

    bored-table-20691

    7 months ago
    Yes, my guess is that there is an enum somewhere that wasn’t updated and TypeScript’s type system is rejecting it, so you should just be able to ignore the type error here.
    f

    faint-table-42725

    7 months ago
    Would happily take a PR to https://github.com/pulumi/pulumi-aws/blob/master/provider/resources.go if you want to update the instances available in the provider
    as the enum is ultimately defined there
    w

    wide-finland-25364

    7 months ago
    I'm new to the TS and gitops. Didn't know about
    @ts-ignore
    . Very interesting.
    It should be a simple copy and paste so maybe I'll do that
    f

    faint-table-42725

    7 months ago
    I think another thing we should do is change the typing w/in
    pulumi/eks
    to allow for
    aws.ec2.InstanceType | string
    to avoid this in the future when the enum doesn’t have everything
    b

    bored-table-20691

    7 months ago
    @faint-table-42725 looking at
    pulumi-eks
    , it seems to accept this as
    aws.ec2.InstanceType
    , and then the
    ec2
    package does define it as
    string | enum.InstanceType
    , so I would think it woudl work
    f

    faint-table-42725

    7 months ago
    Oh, haha, looks like I missed that
    b

    bored-table-20691

    7 months ago
    Actually I take it back, I think I’m wrong on the
    ec2
    package, I was looking at the wrong place.
    f

    faint-table-42725

    7 months ago
    Yeah, I just jumped into there and don’t see that
    b

    bored-table-20691

    7 months ago
    instanceType?: pulumi.Input<string | enums.ec2.InstanceType>;
    This is an example from
    aws.ec2.InstanceState
    f

    faint-table-42725

    7 months ago
    Right, we need to do the same thing w/ eks
    b

    bored-table-20691

    7 months ago
    👍 apologies for the confusion!
    f

    faint-table-42725

    7 months ago
    no worries!
    Thanks for taking a look with me
    b

    bored-table-20691

    7 months ago
    Always good to learn something new 🙂