FEATURES PRICING ABOUT DOCS LOGIN

rabbitmq_binding

The rabbitmq_binding resource creates and manages a binding relationship between a queue an exchange.

Example Usage

resource "rabbitmq_vhost" "test" {
    name = "test"
}

resource "rabbitmq_permissions" "guest" {
    user = "guest"
    vhost = "${rabbitmq_vhost.test.name}"
    permissions {
        configure = ".*"
        write = ".*"
        read = ".*"
    }
}

resource "rabbitmq_exchange" "test" {
    name = "test"
    vhost = "${rabbitmq_permissions.guest.vhost}"
    settings {
        type = "fanout"
        durable = false
        auto_delete = true
    }
}

resource "rabbitmq_queue" "test" {
    name = "test"
    vhost = "${rabbitmq_permissions.guest.vhost}"
    settings {
        durable = true
        auto_delete = false
    }
}

resource "rabbitmq_binding" "test" {
    source = "${rabbitmq_exchange.test.name}"
    vhost = "${rabbitmq_vhost.test.name}"
    destination = "${rabbitmq_queue.test.name}"
    destination_type = "queue"
    routing_key = "#"
    properties_key = "%23"
}

Argument Reference

The following arguments are supported:

Attributes Reference

No further attributes are exported.

Import

Bindings can be imported using the id which is composed of vhost/source/destination/destination_type/properties_key. E.g.

terraform import rabbitmq_binding.test test/test/test/queue/%23

See the source of this document at Terraform.io

REQUEST A DEMO