made use of packages_to_install to install open-iscsi for when longhorn is enabled

This commit is contained in:
Karim Naufal
2022-05-04 03:05:39 +02:00
parent 22585f6210
commit 4bedcc5092
3 changed files with 9 additions and 7 deletions

View File

@@ -13,6 +13,7 @@ module "agents" {
location = each.value.location
server_type = each.value.server_type
ipv4_subnet_id = hcloud_network_subnet.agent[[for i, v in var.agent_nodepools : i if v.name == each.value.nodepool_name][0]].id
packages_to_install = concat(var.enable_longhorn ? ["open-iscsi"] : [], [])
private_ipv4 = cidrhost(hcloud_network_subnet.agent[[for i, v in var.agent_nodepools : i if v.name == each.value.nodepool_name][0]].ip_range, each.value.index + 101)