terraform/juju/home-maas-focal/07-controllers.tf

56 lines
1.1 KiB
Terraform
Raw Normal View History

resource "juju_application" "controller-server" {
name = "controller-server"
model = juju_model.openstack.name
charm {
name = "ubuntu"
2024-05-12 13:43:53 +00:00
channel = var.ubuntu_channel
revision = var.ubuntu_revision
2024-05-07 19:23:43 +00:00
base = var.default-base
}
2024-05-12 13:43:53 +00:00
units = length(var.controller_ids)
placement = "${join(",", sort([
2024-05-13 07:12:59 +00:00
for index in var.controller_ids :
2024-05-12 13:43:53 +00:00
juju_machine.all_machines[index].machine_id
]))}"
}
resource "juju_application" "sysconfig-control" {
name = "sysconfig-control"
model = juju_model.openstack.name
charm {
name = "sysconfig"
2024-05-13 08:25:36 +00:00
channel = var.sysconfig_channel
revision = var.sysconfig_revision
}
2024-05-02 20:44:41 +00:00
units = 0
config = {
governor = "performance"
enable-pti = "on"
update-grub = "true"
enable-tsx = "true"
}
}
resource "juju_integration" "control-sysconfig" {
model = juju_model.openstack.name
application {
2024-05-07 19:23:43 +00:00
name = juju_application.sysconfig-control.name
endpoint = "juju-info"
}
application {
2024-05-07 19:23:43 +00:00
name = juju_application.controller-server.name
endpoint = "juju-info"
}
}