Skip to content

Commit f170a99

Browse files
committed
Updated it to support a newer version of the eks module; Got it to not use deprecated options.
1 parent aacdf18 commit f170a99

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

EKS/FSxN-as-PVC-for-EKS/terraform/eks-cluster.tf

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module "eks" {
22
source = "terraform-aws-modules/eks/aws"
3-
version = "~> 20.0.0"
3+
version = "~> 20.33"
44
cluster_name = local.cluster_name
55
cluster_version = var.kubernetes_version
66
subnet_ids = module.vpc.private_subnets
@@ -115,8 +115,16 @@ resource "aws_iam_role" "trident_role" {
115115
}
116116
]
117117
})
118+
}
119+
120+
resource "aws_iam_role_policy_attachment" "trident_policy_attachment" {
121+
role = aws_iam_role.trident_role.name
122+
policy_arn = aws_iam_policy.trident_policy.arn
123+
}
118124

119-
managed_policy_arns = [aws_iam_policy.trident_policy.arn]
125+
resource "aws_iam_role_policy_attachments_exclusive" "trident_policy_attachment_exclusive" {
126+
role_name = aws_iam_role.trident_role.name
127+
policy_arns = [aws_iam_policy.trident_policy.arn]
120128
}
121129

122130
data "cloudinit_config" "cloudinit" {

0 commit comments

Comments
 (0)