Skip to content

Commit

Permalink
feat: INFRA-504 update duplicated sec groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Issam committed Nov 22, 2023
1 parent 7777f8d commit 850bb2d
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions security_groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -200,30 +200,6 @@ resource "openstack_networking_secgroup_rule_v2" "clients_icmp_access_tunnel_v6"
}

//Allow port 22 and icmp traffic from the bastion
resource "openstack_networking_secgroup_rule_v2" "bastion_ssh_accessible_groups_icmp_access_v4" {
for_each = {
for pair in setproduct(local.bastion_ssh_accessible_group_ids, var.bastion_group_ids) : "${pair[0]}-${pair[1]}" => { sg = pair[0], remote = pair[1] }
}

direction = "ingress"
ethertype = "IPv4"
protocol = "icmp"
security_group_id = each.value.sg
remote_group_id = each.value.remote
}

resource "openstack_networking_secgroup_rule_v2" "bastion_ssh_accessible_groups_icmp_access_v6" {
for_each = {
for pair in setproduct(local.bastion_ssh_accessible_group_ids, var.bastion_group_ids) : "${pair[0]}-${pair[1]}" => { sg = pair[0], remote = pair[1] }
}

direction = "ingress"
ethertype = "IPv6"
protocol = "ipv6-icmp"
security_group_id = each.value.sg
remote_group_id = each.value.remote
}

resource "openstack_networking_secgroup_rule_v2" "bastion_ssh_accessible_groups_ssh_access" {
for_each = {
for pair in setproduct(local.bastion_ssh_accessible_group_ids, var.bastion_group_ids) : "${pair[0]}-${pair[1]}" => { sg = pair[0], remote = pair[1] }
Expand Down

0 comments on commit 850bb2d

Please sign in to comment.