-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanifests.tf
40 lines (35 loc) · 980 Bytes
/
manifests.tf
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
28
29
30
31
32
33
34
35
36
37
38
39
40
resource "null_resource" "manifests" {
depends_on = [
module.efs,
module.eks_cluster.kubernetes_config_map_id,
helm_release.aws_efs
]
provisioner "local-exec" {
command = <<-EOF
aws eks update-kubeconfig --name ${module.eks_cluster.eks_cluster_id}
cat <<EOD | sed 's/##FS_ID##/${module.efs.id}/g' | kubectl apply -f -
${file("${path.module}/files/storageclass.yaml")}
EOD
EOF
}
}
resource "helm_release" "aws_efs" {
depends_on = [
module.efs,
module.eks_cluster.kubernetes_config_map_id,
kubernetes_service_account.efs-csi-controller-sa
]
name = "aws-efs-csi-driver"
repository = "https://kubernetes-sigs.github.io/aws-efs-csi-driver/"
chart = "aws-efs-csi-driver"
namespace = "kube-system"
force_update = true
set {
name = "controller.serviceAccount.create"
value = "false"
}
set {
name = "controller.serviceAccount.name"
value = "efs-csi-controller-sa"
}
}