Skip to content

Commit

Permalink
add ingress_ to port stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Oct 22, 2021
1 parent 99b97b9 commit 045bb2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom/ports.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
locals {
ports = var.port_list
ports = var.ingress_port_list

ingress_networks = var.ingress_networks
egress_networks = var.egress_networks
Expand All @@ -9,6 +9,6 @@ locals {
egress_sg = var.egress_security_groups

p_fields = ["from", "to", "proto", "description", "cidr"]
p_map = length(var.port_list) > 0 ? [for p in local.ports : zipmap(local.p_fields, p)] : var.port_map
p_map = length(var.ingress_port_list) > 0 ? [for p in local.ports : zipmap(local.p_fields, p)] : var.ingress_port_map
port_map = { "external" = local.p_map }
}

0 comments on commit 045bb2b

Please sign in to comment.