-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathebs_csi_driver.tf
More file actions
28 lines (23 loc) · 838 Bytes
/
ebs_csi_driver.tf
File metadata and controls
28 lines (23 loc) · 838 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# EBS CSI driver EKS addon & IAM role for the EBS CSI driver's service account
resource "aws_eks_addon" "ebs_csi_driver" {
cluster_name = local.eks_cluster_name
addon_name = "aws-ebs-csi-driver"
service_account_role_arn = module.ebs_csi_irsa.iam_role_arn
resolve_conflicts_on_create = "OVERWRITE"
resolve_conflicts_on_update = "OVERWRITE"
depends_on = [
module.ebs_csi_irsa,
aws_eks_node_group.nodes
]
}
module "ebs_csi_irsa" {
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
role_name = "ebs-csi"
attach_ebs_csi_policy = true
oidc_providers = {
main = {
provider_arn = aws_iam_openid_connect_provider.this.arn
namespace_service_accounts = ["kube-system:ebs-csi-controller-sa"]
}
}
}