Closed chrisvander closed 3 weeks ago
Hey @chrisvander, sorry you're running into this!
We're addressing the deprecation of the Launch Configuration resource by AWS in the next major release (v3). We're aiming to release it towards the end of the week, but you can already check out the beta version if you'd like to: v3.0.0-beta.1.
Otherwise you can work around this by not creating the default node group of the cluster and instead create one explicitely:
const managedPolicyArns: string[] = [
"arn:aws:iam::aws:policy/AmazonEKSWorkerNodePolicy",
"arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy",
"arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly",
"arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore",
];
// Creates a role and attches the EKS worker node IAM managed policies
export function createRole(name: string): aws.iam.Role {
const role = new aws.iam.Role(name, {
assumeRolePolicy: aws.iam.assumeRolePolicyForPrincipal({
Service: "ec2.amazonaws.com",
}),
});
let counter = 0;
for (const policy of managedPolicyArns) {
// Create RolePolicyAttachment without returning it.
const rpa = new aws.iam.RolePolicyAttachment(`${name}-policy-${counter++}`,
{ policyArn: policy, role: role },
);
}
return role;
}
const nodeRole = createRole("nodeRole");
const eksCluster = new eks.Cluster("cluster", {
skipDefaultNodeGroup: true,
authenticationMode: eks.AuthenticationMode.API,
// your other settings
});
const mng = eks.createManagedNodeGroup("nodegroup", {
cluster: eksCluster,
instanceTypes: ["t3.medium"],
nodeRole,
});
Added to epic https://github.com/pulumi/home/issues/3558
I'll give the beta a shot. Starting to migrate our infrastructure from Terraform to Pulumi so I think we can handle the beta version this week. Thanks!
This is fixed in the latest major release https://github.com/pulumi/pulumi-eks/releases/tag/v3.0.0
What happened?
With a standard EKS Cluster setup, I run into an error stating
Launch configurations were deprecated.
Example
Standard setup in a new account should throw the issue:
Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).