feat: Manage VM identifiers
This commit is contained in:
parent
66c61fafc9
commit
dcc6024af6
7 changed files with 7 additions and 29 deletions
|
|
@ -95,6 +95,7 @@ module "controlplanes" {
|
|||
for_each = { for node in local.controlplanes.nodes : node.name => node }
|
||||
|
||||
node = {
|
||||
id = 100 + tonumber(replace(each.key, "cp", ""))
|
||||
name = format("k8s-wheatley-%s", each.value.name)
|
||||
ipv4_address = each.value.ip_address
|
||||
cpu = local.controlplanes.cpu
|
||||
|
|
@ -112,19 +113,14 @@ module "controlplanes" {
|
|||
}
|
||||
}
|
||||
|
||||
resource "time_sleep" "delay_before_workers" {
|
||||
depends_on = [module.talos-image]
|
||||
|
||||
create_duration = "1s"
|
||||
}
|
||||
|
||||
module "workers" {
|
||||
depends_on = [time_sleep.delay_before_workers]
|
||||
depends_on = [module.talos-image]
|
||||
|
||||
source = "./modules/talos-node"
|
||||
for_each = { for node in local.workers.nodes : node.name => node }
|
||||
|
||||
node = {
|
||||
id = 110 + tonumber(replace(each.key, "worker", ""))
|
||||
name = format("k8s-wheatley-%s", each.value.name)
|
||||
ipv4_address = each.value.ip_address
|
||||
cpu = local.workers.cpu
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue