Skip to content

Commit

Permalink
feat: INFRA-504 Adjust ssh sec groups pair name
Browse files Browse the repository at this point in the history
  • Loading branch information
Issam committed Nov 21, 2023
1 parent 6fde5f5 commit 4df7c78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion security_groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ 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_ssh_access" {
for_each = {
for pair in setproduct(local.bastion_ssh_accessible_group_ids, var.bastion_group_ids) : "${pair[0].name}-${pair[1].name}" => { sg = pair[0], remote = pair[1] }
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"
Expand All @@ -214,6 +214,7 @@ resource "openstack_networking_secgroup_rule_v2" "bastion_ssh_accessible_groups_
remote_group_id = each.value.remote
}


resource "openstack_networking_secgroup_rule_v2" "bastion_member_icmp_access_v4" {
for_each = { for idx, id in var.bastion_group_ids : idx => id }
direction = "ingress"
Expand Down

0 comments on commit 4df7c78

Please sign in to comment.