Are m6a instances not supported by Pulumi? Seems l...
# aws
w
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
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
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
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
yeah everything looks correct
Copy code
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
yeah is this the awsx package? i wonder if thats whats checking on it.
w
import * as eks from "@pulumi/eks";
eks.Cluster
and
eks.ClusterOptions
d
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
What error are you getting?
w
pulumi won't understand the instanceType of
m6a.large
and every other m6a instances
Copy code
(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
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
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
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
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
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
@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
Oh, haha, looks like I missed that
b
Actually I take it back, I think I’m wrong on the
ec2
package, I was looking at the wrong place.
f
Yeah, I just jumped into there and don’t see that
b
Copy code
instanceType?: pulumi.Input<string | enums.ec2.InstanceType>;
This is an example from
aws.ec2.InstanceState
f
Right, we need to do the same thing w/ eks
b
👍 apologies for the confusion!
f
no worries!
Thanks for taking a look with me
b
Always good to learn something new 🙂