diff --git a/nodejs/eks/cluster.ts b/nodejs/eks/cluster.ts index b481023b6..920f54920 100644 --- a/nodejs/eks/cluster.ts +++ b/nodejs/eks/cluster.ts @@ -780,6 +780,10 @@ export function createCore( id: "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly", arn: pulumi.interpolate`arn:${partition}:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly`, }, + { + id: "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy", + arn: "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy", + }, ], }, { parent, provider }, @@ -1762,6 +1766,19 @@ export function createCluster( } } + if (defaultNodeGroup) { + // Add CSI Driver for Storage + const ebsCsiDriver = new aws.eks.Addon( + `${name}-aws-ebs-csi-driver`, + { + addonName: "aws-ebs-csi-driver", + clusterName: core.cluster.name, + }, + { + parent: self, + }, + ); + } // Export the cluster's kubeconfig with a dependency upon the cluster's autoscaling group. This will help // ensure that the cluster's consumers do not attempt to use the cluster until its workers are attached. const kubeconfig = pulumi.all(configDeps).apply(([kc]) => kc); diff --git a/nodejs/eks/storageclass.ts b/nodejs/eks/storageclass.ts index 8ed212af0..b63dd3baf 100644 --- a/nodejs/eks/storageclass.ts +++ b/nodejs/eks/storageclass.ts @@ -20,7 +20,7 @@ import * as pulumi from "@pulumi/pulumi"; /** * EBSVolumeType lists the set of volume types accepted by an EKS storage class. */ -export type EBSVolumeType = "io1" | "gp2" | "sc1" | "st1"; +export type EBSVolumeType = "io1" | "gp2" | "gp3" | "sc1" | "st1"; /** * StorageClass describes the inputs to a single Kubernetes StorageClass provisioned by AWS. Any number of storage