salmon-musician-33665
11/05/2025, 11:38 AMgreat-sunset-355
11/07/2025, 10:26 AMgreat-sunset-355
11/07/2025, 10:29 AM@pulumi/aws to the last bit
here are few code bits I had to modify
const clusterPromise = resolveAccessEntries({ isProdEnvironment: lib.env.isProdEnvironment() }).then(
(accessEntries) =>
new lib.aws.eks.Cluster("services", {
accessEntries,
karpenterVersion: getVersion("karpenter"),
clusterName,
network,
version: config.require("kubernetes-version"),
nodepools: isLocalZone ? ["local-zone-on-demand"] : ["regular-on-demand", "amd64-spot"],
})
);
const cluster = pulumi.output(clusterPromise);
And the transform on the eks.Cluster
{
parent,
transforms: [
(args) => {
// This transform is must due to @pulumi/eks v3 not being able to catch up with aws.eks.Cluster
if (args.type === "aws:eks/cluster:Cluster") {
args.props["bootstrapSelfManagedAddons"] = false;
return { props: args.props, opts: args.opts };
}
return undefined;
},
(args) => {
// We do not use the aws-auth config map because we use accessEntries
// but it keeps causing drifts during refresh
if (
args.type === "kubernetes:core/v1:ConfigMap" &&
args.props &&
args.props.metadata &&
args.props.metadata.name === "aws-auth" &&
args.props.metadata.namespace === "kube-system"
) {
// Set ignoreChanges for this resource
return {
props: args.props,
opts: pulumi.mergeOptions(args.opts, {
ignoreChanges: ["data.mapRoles"],
}),
};
}
return undefined;
},
],
}salmon-musician-33665
11/07/2025, 12:02 PMgreat-sunset-355
11/07/2025, 1:08 PMconst eksCluster = new eks.Cluster({...})
const nodeGroup = new eks.ManagedNodeGroup({cluster: eksCluster},{dependsOn:[eksCluster])
the problem here is that real resources (from aws provider) cannot depend on ComponentResources - there is issue somewhere about this exact problem
what you need is to depend on outputs from the eks.Cluster
const eksCluster = new eks.Cluster({...})
const nodeGroup = new eks.ManagedNodeGroup({cluster: eksCluster.cluster},{dependsOn:[eksCluster.cluster])
this is a one of the design flaws in eks.Cluster component