Skip to content

Commit

Permalink
Allow empty "egress_cidr_blocks" (#93)
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Niland <joe@originalmind.com.au>
Co-authored-by: actions-bot <58130806+actions-bot@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 11, 2021
1 parent 8c43259 commit 83bd076
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "aws_security_group" "default" {
}

resource "aws_security_group_rule" "egress" {
count = module.this.enabled && var.use_existing_security_groups == false ? 1 : 0
count = module.this.enabled && var.use_existing_security_groups == false && length(var.egress_cidr_blocks) > 0 ? 1 : 0
description = "Allow outbound traffic from existing cidr blocks"
from_port = 0
to_port = 0
Expand Down

0 comments on commit 83bd076

Please sign in to comment.