Skip to content

Commit

Permalink
Allow empty "egress_cidr_blocks" (cloudposse#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 and brian-weis-msr committed Apr 2, 2024
1 parent a2b0dc1 commit cca9e7d
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 cca9e7d

Please sign in to comment.