frostmoln_messaging_user (Resource)
Manages an application user on a managed messaging (LavinMQ) instance: an AMQP-only login with a password the platform generates. The user reaches nothing until a frostmoln_messaging_permission grants it a vhost.
Create and destroy wait until the platform has applied the change on the broker; the password is read once the user is ready, and again on every refresh. Operations on one instance run one at a time, so the provider serialises every vhost, user and permission change per instance. Destroying a user is refused while any permission still names it.
Import with <instance_id>/<name>; the import reads the password too.
Authoritative scope — who owns what on this resource, declared in internal/scopedecl and machine-checked against the schema.
Create-immutable — instance_id, name: a user is identified by its name on its instance, and the broker has no rename; changing either creates a new user with a new password.
Observed, not enacted — password: generated by the platform and re-read on every refresh while the user is ready.
Example Usage
# An AMQP-only application user. The platform generates the password; it is
# read once the user is ready.
resource "frostmoln_messaging_user" "billing" {
instance_id = frostmoln_messaging_instance.broker.id
name = "billing-app"
}
# The user reaches nothing until a frostmoln_messaging_permission grants it a
# vhost. Hand the connection URL to the application. The broker serves no TLS
# yet, so connect over plain AMQP from inside the instance's VPC:
output "billing_amqp_url" {
sensitive = true
value = format("amqp://%s:%s@%s:%d/%s", # pragma: allowlist secret
frostmoln_messaging_user.billing.name,
urlencode(frostmoln_messaging_user.billing.password),
frostmoln_messaging_instance.broker.private_ip,
frostmoln_messaging_instance.broker.port,
frostmoln_messaging_vhost.orders.name,
)
}Schema
Required
instance_id(String) The id of thefrostmoln_messaging_instancethe user lives on. Changing it creates the user on the other instance, with a new password, and deletes this one.name(String) The user's name, which is also its AMQP username: 1 to 64 characters ofA-Z,a-z,0-9,.,_and-, starting with a letter or digit, unique on the instance regardless of case (Orderscannot be created whileordersexists); a change in case is a different name. The instance's admin user,guestand__directare refused. Changing it replaces the user and issues a new password.
Optional
timeouts(Block, Optional) (see below for nested schema)
Read-Only
created_at(String) When the user was created.failure_message(String) The last failed change's reason in words, or null.failure_reason(String) The stable code of the user's last failed change (for exampleIN_FLIGHTorBROKER_REFUSED), or null. Every code butOUTCOME_UNKNOWNmeans the broker was left unchanged.id(String) The user's Terraform id,<instance_id>/<name>.password(String, Sensitive) The user's AMQP password, generated by the platform and read once the user isready. Null only while the platform could not serve it; the next refresh reads it. Stored in Terraform state in plaintext —sensitiveredacts CLI output, not the state file. See the Secrets in Terraform state guide.status(String) The user's status:pendingwhile the platform applies a create,ready,deleting, orerrorwhen a create failed (the user is absent or its state unknown; the next apply deletes and re-creates it).updated_at(String) When the user 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:
# Import with the composite ID {instance_id}/{name}. The import reads the
# user's password too.
terraform import frostmoln_messaging_user.billing mq_B352H9idUJP6jTWtom31nW/billing-app