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 8801bd0 commit f551045
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rds-postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Census networks:
* 148.129.0.0/16: Census class B
* 172.16.0.0/12: Census private class B
* 192.168.0.0/16: Census private class C
* 10.0.0.0/8: Censsu private class A
* 10.0.0.0/8: Census private class A

Passing a null or empty list to this field will ignore the ingress setting on these networks.

Expand Down
12 changes: 6 additions & 6 deletions rds-postgres/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* * 148.129.0.0/16: Census class B
* * 172.16.0.0/12: Census private class B
* * 192.168.0.0/16: Census private class C
* * 10.0.0.0/8: Censsu private class A
* * 10.0.0.0/8: Census private class A
*
* Passing a null or empty list to this field will ignore the ingress setting on these networks.
*
Expand Down Expand Up @@ -57,10 +57,10 @@ data "aws_vpc" "this_vpc" {
locals {
vpc_networks = var.use_vpc_cidr ? [data.aws_vpc.this_vpc[0].cidr_block] : []
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] : []
short_description = var.short_description == "" ? var.description : var.short_description
## 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] : []
short_description = var.short_description == "" ? var.description : var.short_description
}

resource "aws_security_group" "this_security_group" {
Expand Down Expand Up @@ -152,7 +152,7 @@ resource "aws_security_group" "this_security_group" {
for_each = length(var.egress_prefix_list_names) > 0 ? local.port_map["external"] : toset([])
iterator = p
content {
description = "${local.short_description}: ${local.egress_sg_names[sg]}"
description = "${local.short_description}"
from_port = 0
to_port = 0
protocol = -1
Expand Down

0 comments on commit f551045

Please sign in to comment.