Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Dec 16, 2024
1 parent ed39ffc commit 5293662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rds-postgres/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ locals {
external_ingress_networks = compact(concat(local.vpc_networks, local.ingress_networks))
## ingress_sg_names = zipmap(var.ingress_security_groups, data.aws_security_group.ingress_security_groups[*].name)
## egress_sg_names = zipmap(var.egress_security_groups, data.aws_security_group.egress_security_groups[*].name)
self = var.enable_self ? [1] : []
## self = var.enable_self ? [1] : []
short_description = var.short_description == "" ? var.description : var.short_description
}

Expand Down Expand Up @@ -112,7 +112,7 @@ resource "aws_security_group" "this_security_group" {

# ingress self (list with one or zero items)
dynamic "ingress" {
for_each = local.self ? local.port_map["external"] : toset([])
for_each = var.enable_self ? local.port_map["external"] : toset([])
iterator = sg
content {
description = "${local.short_description}: ${p.value["description"]}"
Expand Down

0 comments on commit 5293662

Please sign in to comment.