File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
examples/eks/eks_cluster_live_migration Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ module "eks" {
1818 vpc-cni = {
1919 most_recent = true
2020 }
21+ aws-ebs-csi-driver = {
22+ service_account_role_arn = module.ebs_csi_irsa_role.iam_role_arn
23+ resolve_conflicts = " OVERWRITE"
24+ }
2125 }
2226
2327 tags = var. tags
@@ -67,6 +71,21 @@ module "eks" {
6771
6872}
6973
74+ module "ebs_csi_irsa_role" {
75+ source = " terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
76+ version = " ~> 4.21.1"
77+
78+ role_name = " ebs-csi-${ var . cluster_name } "
79+ attach_ebs_csi_policy = true
80+
81+ oidc_providers = {
82+ ex = {
83+ provider_arn = module.eks.oidc_provider_arn
84+ namespace_service_accounts = [" kube-system:ebs-csi-controller-sa" ]
85+ }
86+ }
87+ }
88+
7089# Example additional security group.
7190resource "aws_security_group" "additional" {
7291 name_prefix = " ${ var . cluster_name } -additional"
Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ terraform {
1111 version = " ~> 3.0"
1212 }
1313 aws = {
14- source = " hashicorp/aws"
15- version = " ~> 5.0"
14+ source = " hashicorp/aws"
1615 }
1716 }
1817 required_version = " >= 1.3.2"
You can’t perform that action at this time.
0 commit comments