File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ resource "aws_security_group" "default" {
10
10
11
11
resource "aws_security_group_rule" "egress" {
12
12
count = module. this . enabled && var. use_existing_security_groups == false ? 1 : 0
13
- description = " Allow all egress traffic"
13
+ description = " Allow outbound traffic from existing cidr blocks "
14
14
from_port = 0
15
15
to_port = 0
16
16
protocol = " -1"
17
- cidr_blocks = [ " 0.0.0.0/0 " ]
17
+ cidr_blocks = var . egress_cidr_blocks
18
18
security_group_id = join (" " , aws_security_group. default . * . id )
19
19
type = " egress"
20
20
}
Original file line number Diff line number Diff line change @@ -210,3 +210,9 @@ variable "cloudwatch_metric_alarms_enabled" {
210
210
description = " Boolean flag to enable/disable CloudWatch metrics alarms"
211
211
default = false
212
212
}
213
+
214
+ variable egress_cidr_blocks {
215
+ type = list
216
+ default = [" 0.0.0.0/0" ]
217
+ description = " Outbound traffic address"
218
+ }
You can’t perform that action at this time.
0 commit comments