Get it all working now

This commit is contained in:
Arif Ali 2024-05-13 08:12:59 +01:00
parent 84080f9d8d
commit b385b8ee25
Signed by: arif
GPG Key ID: 369608FBA1353A70
12 changed files with 12 additions and 17 deletions

View File

@ -15,11 +15,6 @@ variable "controller_ids" {
"103", "104", "105"]
}
variable "controller_ids_high" {
type = list(string)
default = ["103", "104", "105"]
}
variable "compute_ids" {
type = list(string)
default = ["1000", "1001", "1002", "1003",

View File

@ -1,7 +1,7 @@
resource "juju_machine" "keystone" {
count = var.num_units
model = var.model-name
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids_high[count.index+var.num_units]].machine_id])
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids[count.index+var.num_units]].machine_id])
constraints = "spaces=oam"
}

View File

@ -1,7 +1,7 @@
resource "juju_machine" "rmq" {
count = var.num_units
model = var.model-name
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids_high[count.index+var.num_units]].machine_id])
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids[count.index+var.num_units]].machine_id])
constraints = "spaces=oam"
}

View File

@ -1,7 +1,7 @@
resource "juju_machine" "ceilometer" {
count = var.num_units
model = var.model-name
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids_high[count.index+var.num_units]].machine_id])
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids[count.index+var.num_units]].machine_id])
constraints = "spaces=oam"
}

View File

@ -11,7 +11,7 @@ resource "juju_application" "ceph-osd" {
units = length(var.compute_ids)
placement = "${join(",", sort([
for index, _ in var.compute_ids :
for index in var.compute_ids :
juju_machine.all_machines[index].machine_id
]))}"

View File

@ -1,7 +1,7 @@
resource "juju_machine" "gnocchi" {
count = var.num_units
model = var.model-name
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids_high[count.index+var.num_units]].machine_id])
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids[count.index+var.num_units]].machine_id])
constraints = "spaces=oam,ceph-access"
}

View File

@ -1,7 +1,7 @@
resource "juju_machine" "ncc" {
count = var.num_units
model = var.model-name
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids_high[count.index+var.num_units]].machine_id])
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids[count.index+var.num_units]].machine_id])
constraints = "spaces=oam"
}

View File

@ -1,7 +1,7 @@
resource "juju_machine" "placement" {
count = var.num_units
model = var.model-name
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids_high[count.index+var.num_units]].machine_id])
placement = join(":", ["lxd", juju_machine.all_machines[var.controller_ids[count.index+var.num_units]].machine_id])
constraints = "spaces=oam"
}

View File

@ -11,7 +11,7 @@ resource "juju_application" "nova-compute-kvm" {
units = length(var.compute_ids)
placement = "${join(",", sort([
for index, _ in var.compute_ids :
for index in var.compute_ids :
juju_machine.all_machines[index].machine_id
]))}"

View File

@ -13,7 +13,7 @@ resource "juju_application" "controller-server" {
units = length(var.controller_ids)
placement = "${join(",", sort([
for index, _ in var.controller_ids :
for index in var.controller_ids :
juju_machine.all_machines[index].machine_id
]))}"
}

View File

@ -11,7 +11,7 @@ resource "juju_application" "neutron-gateway" {
units = var.num_units
placement = "${join(",", sort([
for index, _ in slice(var.controller_ids, 0, var.num_units+1) :
for index in slice(var.controller_ids, 0, var.num_units) :
juju_machine.all_machines[index].machine_id
]))}"

View File

@ -1,7 +1,7 @@
resource "juju_machine" "vault" {
count = var.num_units
model = var.model-name
placement = join(":",["lxd",juju_machine.all_machines[var.sdn_ids[count.index+var.num_units]].machine_id])
placement = join(":",["lxd",juju_machine.all_machines[var.sdn_ids[count.index]].machine_id])
constraints = "spaces=oam"
}
@ -76,7 +76,7 @@ resource "juju_application" "hacluster-vault" {
resource "juju_machine" "etcd" {
count = var.num_units
model = var.model-name
placement = join(":",["lxd",juju_machine.all_machines[var.sdn_ids[count.index+var.num_units]].machine_id])
placement = join(":",["lxd",juju_machine.all_machines[var.sdn_ids[count.index]].machine_id])
constraints = "spaces=oam"
}