ulamlabs
terraform-aws-rabbitmq
HCL

Terraform configuration for creating RabbitMQ cluster on AWS.

Last updated Jun 30, 2026
101
Stars
83
Forks
6
Issues
0
Stars/day
Attention Score
36
Language breakdown
HCL 100.0%
Files click to expand
README

Dead simple Terraform configuration for creating RabbitMQ cluster on AWS.

| Branch | Build status | | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | master | Build Status |

What it does ?

  • Uses official RabbitMQ docker image.
  • Creates N nodes in M subnets
  • Creates Autoscaling Group and ELB to load balance nodes
  • Makes sure nodes can talk to each other and create cluster
  • Make sure new nodes always join the cluster
  • Configures / vhost queues in High Available (Mirrored) mode with automatic synchronization ("ha-mode":"all", "ha-sync-mode":"3")

How to use it ?

Copy and paste into your Terraform configuration:
module "rabbitmq" {
  source                            = "ulamlabs/rabbitmq/aws"
  version                           = "3.0.0"
  vpcid                            = var.vpcid
  sshkeyname                      = var.sshkeyname
  subnetids                        = var.subnetids
  elbadditionalsecuritygroupids = var.clustersecuritygroup_id
  min_size                          = "3"
  max_size                          = "3"
  desired_size                      = "3"
}

then run terraform init, terraform plan and terraform apply.

Are 3 node not enough ? Update sizes to 5 and run terraform apply again, it will update Autoscaling Group and add 2 nodes more. Dead simple.

Node becomes unresponsive ? Autoscaling group and ELB Health Checks will automatically replace it with new one, without data loss.

Note: The VPC must have enableDnsHostnames = true and enableDnsSupport = true for the private DNS names to be resolvable for the nodes to connect to each other.

🔗 More in this category

© 2026 GitRepoTrend · ulamlabs/terraform-aws-rabbitmq · Updated daily from GitHub