Skip to content

frostmoln_messaging_vhost (Resource) ​

Manages a virtual host (vhost) on a managed messaging (LavinMQ) instance. A vhost is an isolated namespace of exchanges, queues and bindings; grant a frostmoln_messaging_user access to it with a frostmoln_messaging_permission.

Create and destroy wait until the platform has applied the change on the broker. Operations on one instance run one at a time, so the provider serialises every vhost, user and permission change per instance (other instances still proceed in parallel). Destroying a vhost DELETES EVERY MESSAGE IN IT, and is refused while any permission still names it.

Import with <instance_id>/<name>.

Authoritative scope — who owns what on this resource, declared in internal/scopedecl and machine-checked against the schema.

Create-immutable — instance_id, name: a vhost is identified by its name on its instance, and the broker has no rename; changing either creates a new, empty vhost and deletes every message in this one.

Example Usage ​

terraform
# A vhost on a managed messaging instance. Destroying it deletes every message
# in it, and is refused while a permission still names it.
resource "frostmoln_messaging_vhost" "orders" {
  instance_id = frostmoln_messaging_instance.broker.id
  name        = "orders"
}

Schema ​

Required ​

  • instance_id (String) The id of the frostmoln_messaging_instance the vhost lives on. Changing it creates the vhost on the other instance and deletes this one.
  • name (String) The vhost's name: 1 to 64 characters of A-Z, a-z, 0-9, ., _ and -, starting with a letter or digit, unique on the instance regardless of case (Orders cannot be created while orders exists); a change in case is a different name. Changing it replaces the vhost and deletes every message in the old one.

Optional ​

Read-Only ​

  • created_at (String) When the vhost was created.
  • failure_message (String) The last failed change's reason in words, or null.
  • failure_reason (String) The stable code of the vhost's last failed change (for example IN_FLIGHT or BROKER_REFUSED), or null. Every code but OUTCOME_UNKNOWN means the broker was left unchanged.
  • id (String) The vhost's Terraform id, <instance_id>/<name>.
  • status (String) The vhost's status: pending while the platform applies a create, ready, deleting, or error when a create failed (the vhost is absent or its state unknown; the next apply deletes and re-creates it).
  • updated_at (String) When the vhost last changed.

Nested Schema for timeouts ​

Optional:

  • create (String) How long the provider waits for the create operation to converge before giving up (e.g. "45m", "2h").
  • delete (String) How long the provider waits for the delete to complete before giving up (e.g. "30m").
  • update (String) How long the provider waits for an update (resize, in-place change) to converge before giving up (e.g. "30m").

Import ​

Import is supported using the following syntax:

The terraform import command can be used, for example:

shell
# Import with the composite ID {instance_id}/{name}.
terraform import frostmoln_messaging_vhost.orders mq_B352H9idUJP6jTWtom31nW/orders