juju_enable_ha (Action)¶
Enables high availability (HA) on a Juju controller by ensuring the desired number of controller units are running.
Example Usage¶
resource "juju_controller" "this" {
name = "my-controller"
# ...
}
action "juju_enable_ha" "this" {
api_addresses = juju_controller.this.api_addresses
ca_cert = juju_controller.this.ca_cert
username = juju_controller.this.username
password = juju_controller.this.password
units = 3
}
Schema¶
Required¶
api_addresses(List of String) API addresses of the target controller. Reference from the controller resource: juju_controller..api_addresses. ca_cert(String) CA certificate of the target controller. Reference from the controller resource: juju_controller..ca_cert. password(String) Admin password for the target controller. Reference from the controller resource: juju_controller..password. units(Number) Desired number of controller units. Must be an odd number and at least 3. Increasing the number of units is supported; decreasing is not possible via this action and must be done manually via the Juju CLI.username(String) Admin username for the target controller. Reference from the controller resource: juju_controller..username.
Optional¶
constraints(String) Optional placement constraints for newly provisioned controller units (e.g. “mem=8G cores=4”).to(List of String) Optional list of placement directives for new controller units (e.g. [“lxd:0”, “lxd:1”]).