File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -42,4 +42,5 @@ module "efs" {
4242 subnets = module. subnets . public_subnet_id
4343 security_groups = [module . vpc . vpc_default_security_group_id ]
4444 efs_backup_policy_enabled = true
45+ allow_cidr = [" 10.0.0.0/16" ] # vpc_cidr
4546}
Original file line number Diff line number Diff line change @@ -59,6 +59,13 @@ resource "aws_security_group" "default" {
5959 security_groups = var. security_groups
6060 }
6161
62+ ingress {
63+ from_port = " 2049" # NFS
64+ to_port = " 2049"
65+ protocol = " tcp"
66+ cidr_blocks = var. allow_cidr # tfsec:ignore:aws-vpc-no-public-egress-sgr
67+ }
68+
6269 egress {
6370 from_port = 0
6471 to_port = 0
Original file line number Diff line number Diff line change @@ -140,4 +140,10 @@ variable "efs_backup_policy_enabled" {
140140 type = bool
141141 default = true
142142 description = " If `true`, it will turn on automatic backups."
143+ }
144+
145+ variable "allow_cidr" {
146+ type = list (any )
147+ default = []
148+ description = " Provide allowed cidr to efs"
143149}
You can’t perform that action at this time.
0 commit comments