Skip to content

Commit aa12167

Browse files
committed
fix security_group_id logic
1 parent 3219034 commit aa12167

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

environments/skeleton/{{cookiecutter.environment}}/tofu/control.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ resource "openstack_networking_port_v2" "control" {
1515
}
1616

1717
port_security_enabled = lookup(each.value, "port_security_enabled", null)
18-
security_group_ids = lookup(each.value, "port_security_enabled", null) != false ? [for o in data.openstack_networking_secgroup_v2.nonlogin: o.id] : []
18+
security_group_ids = lookup(each.value, "port_security_enabled", true) ? [for o in data.openstack_networking_secgroup_v2.nonlogin: o.id] : []
1919

2020
binding {
2121
vnic_type = lookup(var.vnic_types, each.key, "normal")

environments/skeleton/{{cookiecutter.environment}}/tofu/node_group/nodes.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ resource "openstack_networking_port_v2" "compute" {
4646
}
4747

4848
port_security_enabled = lookup(each.value, "port_security_enabled", null)
49-
security_group_ids = lookup(each.value, "port_security_enabled", null) != false ? var.security_group_ids : []
49+
security_group_ids = lookup(each.value, "port_security_enabled", true) ? var.security_group_ids : []
5050

5151
binding {
5252
vnic_type = lookup(var.vnic_types, each.value.network, "normal")

0 commit comments

Comments
 (0)