-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathefs.tf
35 lines (30 loc) · 934 Bytes
/
efs.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
module efs_security_group {
source = "./modules/security-group"
name = "efs"
group = "storage"
namespace = var.name
environment = var.environment
vpc_id = module.vpc.vpc_id
description = "Security group for storage layer"
ingress = [
for vpn_security_group_id in module.vpn_security_group.*.id : {
name = "vpn-to-efs"
description = "VPN to EFS Rule"
from_port = 2049
to_port = 2049
security_group_id = vpn_security_group_id
protocol = "tcp"
cidr_block = null
}
]
}
module efs {
source = "./modules/efs"
name = "volume"
group = "storage"
namespace = var.name
environment = var.environment
subnet_ids = module.vpc.private_subnet_ids
use_security_group_id = module.efs_security_group.id
root_path = var.container.volume_root
}