Difference between revisions of "Terraform irsa-ebs-csi module"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
 
   oidc_fully_qualified_subjects = ["system:serviceaccount:kube-system:ebs-csi-controller-sa"]
 
   oidc_fully_qualified_subjects = ["system:serviceaccount:kube-system:ebs-csi-controller-sa"]
 
  }
 
  }
 +
 +
 +
{{aws_eks_addon.aws-ebs-csi-driver}}
  
 
== Related ==
 
== Related ==
* [[Terraform EKS module]]
+
* [[Terraform EKS module]]: <code>[[enable_irsa]]</code>
 
 
  
 
== See also ==
 
== See also ==

Latest revision as of 16:19, 29 February 2024


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[edit]

See also[edit]

Advertising: