Shane A. Stillwell

Terraform Rabbitmq Cloudamqp

I wanted to use Terraform to manage the Exchanges, Queues, and Bindings for my RabbitMQ at CloudAMQP. It was working great against my local docker of RabbitMQ, but when I tried to use it with the free shared plan, I just kept getting 401’s. Double checked the username/password/vhost many times. It just doesn’t work.

Github Issue

terraform {
  required_providers {
    rabbitmq = {
      source  = "cyrilgdn/rabbitmq"
      version = "~> 1.8.0"
    }
  }
}

provider "rabbitmq" {
  endpoint = var.rabbitmq_endpoint
  username = var.rabbitmq_username
  password = var.rabbitmq_password
}

I could use Northflank to host my own RabbitMQ instance, but that sounds a little risky and would cost about $15/month.