Skip to content

Commit 66ca7fe

Browse files
authored
Merge pull request #758 from stackhpc/feat/login-custom-secgroups
Allow specifying security groups for individual login groups
2 parents ae8db38 + 34c883a commit 66ca7fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

environments/site/tofu/login.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module "login" {
4040
# not using openstack_compute_instance_v2.control.access_ip_v4 to avoid
4141
# updates to node metadata on deletion/recreation of the control node:
4242
control_address = openstack_networking_port_v2.control[var.cluster_networks[0].network].all_fixed_ips[0]
43-
security_group_ids = [for o in data.openstack_networking_secgroup_v2.login: o.id]
43+
security_group_ids = lookup(each.value, "security_group_ids", [for o in data.openstack_networking_secgroup_v2.login: o.id])
4444
baremetal_nodes = data.external.baremetal_nodes.result
4545

4646
# input dict validation:
@@ -63,5 +63,6 @@ module "login" {
6363
"ip_addresses",
6464
"gateway_ip",
6565
"nodename_template",
66+
"security_group_ids"
6667
]
6768
}

0 commit comments

Comments
 (0)