Terraform irsa-ebs-csi module

From wikieduonline
Revision as of 16:19, 29 February 2024 by Welcome (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


module "irsa-ebs-csi" {
  source  = "terraform-aws-modules/iam/aws//modules/iam-assumable-role-with-oidc"
  version = "4.7.0"

  create_role                   = true
  role_name                     = "AmazonEKSTFEBSCSIRole-${module.eks.cluster_name}"
  provider_url                  = module.eks.oidc_provider
  role_policy_arns              = [data.aws_iam_policy.ebs_csi_policy.arn]
  oidc_fully_qualified_subjects = ["system:serviceaccount:kube-system:ebs-csi-controller-sa"]
}


resource "aws_eks_addon" "ebs-csi" {
 cluster_name             = module.eks.cluster_name
 addon_name               = "aws-ebs-csi-driver"
 addon_version            = "v1.20.0-eksbuild.1"
 service_account_role_arn = module.irsa-ebs-csi.iam_role_arn
 tags = {
   "eks_addon" = "ebs-csi"
   "terraform" = "true"
 }
}

Related

See also

Advertising: