Skip to main content

okustera_rabbitmq_cluster (Resource)

The okustera_rabbitmq_cluster resource provisions and manages production-grade RabbitMQ messaging clusters in Okustera via the RabbitMQ Topology Operator. Clusters feature automated quorum queue clustering, persistent Ceph volume claims, and credential escrow in OpenStack Barbican.

Example Usage​

3-Node High-Availability RabbitMQ Cluster​

resource "okustera_rabbitmq_cluster" "messaging" {
name = "order-events-bus"
namespace = "default"
replicas = 3
storage_size = "20Gi"
storage_class = "ceph-rbd"
}

output "amqp_uri" {
value = "amqp://${okustera_rabbitmq_cluster.messaging.default_user}:${okustera_rabbitmq_cluster.messaging.default_pass}@${okustera_rabbitmq_cluster.messaging.amqp_endpoint}/"
sensitive = true
description = "Full AMQP connection string"
}

output "management_dashboard" {
value = okustera_rabbitmq_cluster.messaging.management_endpoint
description = "RabbitMQ Web Management UI"
}

Schema​

Required​

  • name (String) Unique name of the RabbitMQ cluster.

Optional​

  • namespace (String) Kubernetes namespace for the cluster pods. Defaults to default.
  • replicas (Number) Number of server nodes (defaults to 3 for HA clustering).
  • storage_size (String) Persistent volume claim size per replica. Defaults to "10Gi".
  • storage_class (String) Kubernetes StorageClass name. Defaults to "ceph-rbd".
  • image (String) Container image override for customized RabbitMQ versions or plugins.

Read-Only Attributes​

  • id (String) Unique cluster identifier.
  • amqp_endpoint (String) AMQP 0-9-1 connection endpoint (hostname:5672).
  • management_endpoint (String) RabbitMQ Management Web UI endpoint (hostname:15672).
  • default_user (String) Administrative default username.
  • default_pass (String, Sensitive) Administrative default password.
  • status (String) Operational health status of the cluster (Running, Creating, Failed).

Import​

Existing RabbitMQ clusters can be imported using namespace/name or simply name (which defaults to default namespace):

terraform import okustera_rabbitmq_cluster.messaging default/order-events-bus