Skip to content

Commit

Permalink
Introduce new optional variable to attach additional security groups …
Browse files Browse the repository at this point in the history
…to LBs
  • Loading branch information
simu committed Dec 16, 2024
1 parent 574c399 commit 1907c59
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ module "lb" {
enable_proxy_protocol = var.lb_enable_proxy_protocol
additional_networks = var.additional_lb_networks

cluster_security_group_ids = [
exoscale_security_group.all_machines.id
]
cluster_security_group_ids = concat(
[exoscale_security_group.all_machines.id],
var.additional_lb_security_group_ids
)

additional_affinity_group_ids = var.additional_affinity_group_ids

Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,9 @@ variable "additional_lb_networks" {
description = "List of UUIDs of additional Exoscale private networks to attach"
default = []
}

variable "additional_lb_security_group_ids" {
type = list(string)
default = []
description = "List of additional security group IDs to configure on the LBs"
}

0 comments on commit 1907c59

Please sign in to comment.