feat: add variable master and worker counts

This commit is contained in:
2026-08-14 22:08:45 +01:00
parent aa0e9f37bf
commit 9abb0b010e
2 changed files with 17 additions and 7 deletions
+3 -7
View File
@@ -3,14 +3,10 @@
# ------
locals {
image = "ubuntu/26.04"
root_disk_size = "16GiB"
ext_disk_size = "16GiB"
network_cidr = "10.150.0.1/24"
master_count = 3
worker_count = 0
image = "ubuntu/26.04"
}
# ---------
@@ -46,7 +42,7 @@ resource "incus_network" "this" {
module "master" {
source = "./modules/incus_vm"
count = local.master_count
count = var.master_count
name = "master-${count.index}"
project = incus_project.this.name
@@ -60,7 +56,7 @@ module "master" {
module "worker" {
source = "./modules/incus_vm"
count = local.worker_count
count = var.worker_count
name = "worker-${count.index}"
project = incus_project.this.name