File tree Expand file tree Collapse file tree 4 files changed +23
-1
lines changed
Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,16 @@ resource "aws_security_group_rule" "ingress" {
6161 security_group_id = " ${ aws_security_group . default . id } "
6262}
6363
64+ resource "aws_security_group_rule" "ingress_cidr" {
65+ count = " ${ module . enabled . value && length (compact (var. ingress_cidr )) > 0 ? 1 : 0 } "
66+ type = " ingress"
67+ from_port = " 2049"
68+ to_port = " 2049"
69+ protocol = " tcp"
70+ cidr_blocks = [" ${ var . ingress_cidr } " ]
71+ security_group_id = " ${ aws_security_group . default . id } "
72+ }
73+
6474resource "aws_security_group_rule" "egress" {
6575 count = " ${ module . enabled . value } "
6676 type = " egress"
Original file line number Diff line number Diff line change 11// EFS File System outputs
22output "dns_name" {
3- description = " "
3+ description = " FQDN of the EFS volume "
44 value = " ${ element (concat (aws_efs_file_system. default . * . dns_name , list (" " )),0 )} "
55}
66
@@ -14,6 +14,11 @@ output "kms_key_id" {
1414 value = " ${ element (concat (aws_efs_file_system. default . * . kms_key_id , list (" " )),0 )} "
1515}
1616
17+ output "name" {
18+ description = " Service name that was passed in. This is to make creating mount points easier"
19+ value = " ${ module . label . name } "
20+ }
21+
1722// EFS Mount Target outputs
1823/*
1924# Same as EFS mount_target_dns_names
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ module "efs" {
99 zone_id = " ZURF67XJUWC5A" # one
1010
1111 security_groups = []
12+ ingress_cidr = [" 10.0.0.0/8" ]
1213 subnets = [" subnet-857efce3" , " subnet-0852f140" , " subnet-6395c038" ]
1314 vpc_id = " vpc-417c0027" # one
1415
Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ variable "encrypted" {
6868 default = " false"
6969}
7070
71+ variable "ingress_cidr" {
72+ description = " List of CIDR to allow access to EFS"
73+ type = " list"
74+ default = []
75+ }
76+
7177variable "kms_key_id" {
7278 description = " ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true"
7379 type = " string"
You can’t perform that action at this time.
0 commit comments