Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Dec 9, 2024
1 parent af2eb9b commit ec03b8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions rds-postgres/data.prefix_lists.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
data "aws_ec2_managed_prefix_list" "ingress" {
for_each = toset(var.ingress_prefix_list_names)
filter {
name = "prefix-list-name"
values = [each.key]
}
}

data "aws_ec2_managed_prefix_list" "egress" {
for_each = toset(var.egress_prefix_list_names)
filter {
name = "prefix-list-name"
values = [each.key]
}
}
2 changes: 1 addition & 1 deletion rds-postgres/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ resource "aws_security_group" "this_security_group" {


# ingress with prefix lists
ingress {
dynamic "ingress" {
for_each = length(var.ingress_prefix_list_names) > 0 ? local.port_map["external"] : {}
iterator = p
content {
Expand Down

0 comments on commit ec03b8e

Please sign in to comment.