File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
environments/skeleton/{{cookiecutter.environment}}/tofu Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ resource "openstack_networking_port_v2" "control" {
14
14
subnet_id = data. openstack_networking_subnet_v2 . cluster_subnet [each . key ]. id
15
15
}
16
16
17
- security_group_ids = [for o in data . openstack_networking_secgroup_v2 . nonlogin : o . id ]
17
+ port_security_enabled = lookup (each. value , " port_security_enabled" , true )
18
+ security_group_ids = lookup (each. value , " port_security_enabled" , true ) ? [for o in data . openstack_networking_secgroup_v2 . nonlogin : o . id ] : []
18
19
19
20
binding {
20
21
vnic_type = lookup (var. vnic_types , each. key , " normal" )
Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ resource "openstack_networking_port_v2" "compute" {
45
45
subnet_id = data. openstack_networking_subnet_v2 . subnet [each . value . network ]. id
46
46
}
47
47
48
- security_group_ids = var. security_group_ids
48
+ port_security_enabled = lookup (each. value , " port_security_enabled" , true )
49
+ security_group_ids = lookup (each. value , " port_security_enabled" , true ) ? var. security_group_ids : []
49
50
50
51
binding {
51
52
vnic_type = lookup (var. vnic_types , each. value . network , " normal" )
Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ variable "cluster_networks" {
13
13
type = list (map (string ))
14
14
description = <<- EOT
15
15
List of mappings defining networks. Mapping key/values:
16
- network: Name of existing network
17
- subnet: Name of existing subnet
16
+ network: Required. Name of existing network
17
+ subnet: Required. Name of existing subnet
18
+ port_security_enabled: Optional. Bool, default true
18
19
EOT
19
20
}
20
21
You can’t perform that action at this time.
0 commit comments