-
Notifications
You must be signed in to change notification settings - Fork 2
/
csi_drivers.tf
70 lines (54 loc) · 1.76 KB
/
csi_drivers.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
resource "aws_efs_file_system" "eks" {
creation_token = module.eks.cluster_name
tags = {
Name = module.eks.cluster_name
}
}
resource "aws_security_group" "efs_eks" {
name = "efs-devops-stack"
description = "Security group for EFS"
vpc_id = module.vpc.vpc_id
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
ingress {
from_port = 2049
to_port = 2049
protocol = "tcp"
security_groups = [module.eks.node_security_group_id]
}
}
resource "aws_efs_mount_target" "eks" {
count = length(local.private_subnets)
file_system_id = resource.aws_efs_file_system.eks.id
subnet_id = element(module.vpc.private_subnets, count.index)
security_groups = [resource.aws_security_group.efs_eks.id]
}
module "efs" {
source = "git::https://github.com/camptocamp/devops-stack-module-efs-csi-driver.git?ref=v5.0.0"
# source = "../../devops-stack-module-efs-csi-driver"
cluster_name = local.cluster_name
argocd_project = module.eks.cluster_name
app_autosync = local.app_autosync
efs_file_system_id = resource.aws_efs_file_system.eks.id
create_role = true
cluster_oidc_issuer_url = module.eks.cluster_oidc_issuer_url
dependency_ids = {
argocd = module.argocd_bootstrap.id
}
}
module "ebs" {
source = "git::https://github.com/camptocamp/devops-stack-module-ebs-csi-driver.git?ref=v4.0.0"
# source = "../../devops-stack-module-ebs-csi-driver"
cluster_name = local.cluster_name
argocd_project = module.eks.cluster_name
app_autosync = local.app_autosync
create_role = true
cluster_oidc_issuer_url = module.eks.cluster_oidc_issuer_url
dependency_ids = {
argocd = module.argocd_bootstrap.id
}
}