Skip to content

Commit

Permalink
Modified Code
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-das committed Jan 17, 2020
1 parent 9dac4f9 commit a470e86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security-groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "aws_security_group" "security_group" {
}

dynamic "ingress" {
for_each = length(var.ingress_rules) == 0 ? [] : var.ingress_rules
for_each = var.ingress_rules
content {
from_port = lookup(ingress.value, "from_port", null)
to_port = lookup(ingress.value, "to_port", null)
Expand All @@ -25,7 +25,7 @@ resource "aws_security_group" "security_group" {
}

dynamic "egress" {
for_each = length(var.egress_rules) == 0 ? [] : var.egress_rules
for_each = var.egress_rules
content {
from_port = lookup(egress.value, "from_port", null)
to_port = lookup(egress.value, "to_port", null)
Expand Down

0 comments on commit a470e86

Please sign in to comment.