frostmoln_messaging_instance (Resource)
Manages a managed messaging (LavinMQ) instance in the Frostmoln platform.
Authoritative scope — who owns what on this resource, declared in internal/scopedecl and machine-checked against the schema.
Enacted and reconciled — every configurable attribute not listed below: the platform applies it, and a refresh reads the truth back.
Create-immutable — require_tls: the TLS requirement is fixed at create (the platform refuses a change with REQUIRE_TLS_IMMUTABLE); a change re-creates the instance, and an instance whose state predates the attribute is never replaced for it.
Create-immutable — type: the type is chosen at create — one type's instance does not become another's in place.
Create-immutable — subnet_id, version, vpc_id: the platform has no in-place migration for it — a change re-creates the instance.
Observed, not enacted — hostname: platform-derived at create from name's DNS label, the VPC, tenant and organization; fixed for life (a rename does not move it), null on an instance without a certificate. private_ip: platform-assigned from the subnet at create. public_name: platform-derived from the DNS label at create and frozen; present only while the instance has a public IP. tags_all: keys set outside Terraform — in the portal, by the fm CLI, or stamped by the platform — appear only here and are kept on every apply, never removed. tls_enabled: whether the platform issued the instance a certificate at create; false for an instance without a certificate.
Example Usage
resource "frostmoln_messaging_instance" "broker" {
name = "my-broker"
type = "lavinmq"
version = "2.3"
flavor_id = "mq.gp1.small"
vpc_id = frostmoln_vpc.main.id
subnet_id = frostmoln_subnet.private.id
persistence_mode = "persistent"
# TLS only (the default): plaintext AMQP and HTTP management are closed and
# port / management_port are null. Fixed at create; set false only for
# clients that cannot do TLS.
require_tls = true
# Resource tags: your own metadata for search and filtering. Merged with
# the provider's default_tags; changing them updates in place.
tags = {
env = "prod"
}
}
# The broker's certificate is issued for its hostname by the Frostmoln customer
# CA (trust the bundle from the frostmoln_ca_bundle data source and verify the
# server against this name). Null, with tls_enabled false, on an instance
# without a certificate.
output "broker_hostname" {
value = frostmoln_messaging_instance.broker.tls_enabled ? frostmoln_messaging_instance.broker.hostname : null
}Schema
Required
flavor_id(String) The flavor/size for the messaging instance (e.g. "mq.gp1.small", "mq.gp1.medium").name(String) The name of the messaging instance. It is also the instance's DNS name (hostnameis derived from it), so it must contain at least one ASCII letter or digit (otherwise the create is refused with 400) and must be unique within the VPC, including names still held by instances renamed since: a taken name fails the create withINSTANCE_DNS_NAME_TAKEN.create_before_destroywith an unchangednamefails: the replacement is created while the old instance still holds the name in the VPC.subnet_id(String) The subnet ID where the messaging instance will be deployed.vpc_id(String) The VPC ID where the messaging instance will be deployed.
Optional
persistence_mode(String) The persistence mode for the messaging instance ("none" or "persistent"). Defaults to "persistent".require_tls(Boolean) Whether the broker refuses plaintext: true serves AMQPS and HTTPS management only (portandmanagement_portare null, the plaintext ports closed); false serves plaintext AMQP and HTTP management as well (beside TLS whentls_enabled). Defaults to true when omitted. Fixed at create: changing it replaces the instance. Instances created before the setting existed report false. True withtls_enabledfalse means the instance has no usable endpoint (the instance is in statuserror); recreate it.tags(Map of String) Resource tags on the instance: your own key/value metadata for search and filtering (?tag=key=valuein the API,--tagin the fm CLI), stored by the platform only and never applied to the broker. Changing them updates the instance in place and does not restart or reconfigure it. At most 32 keys including the tenant's default tags, which the platform merges in at create; a key is 1-64 bytes matching^[a-zA-Z0-9]([a-zA-Z0-9._:/-]*[a-zA-Z0-9])?$, a value at most 256 bytes; keys beginningfrostmoln_orfrostmoln-(any case) are reserved. Merged with the provider'sdefault_tagson every write (a key set here wins). Holds only the keys this configuration sets; the full set is intags_all.timeouts(Block, Optional) (see below for nested schema)type(String) The messaging type. Only "lavinmq" is currently supported. Defaults to "lavinmq".version(String) The version (e.g. "2.3"). Defaults to the recommended version when omitted.
Read-Only
amqps_port(Number) The AMQPS (TLS) port number the messaging instance is listening on.created_at(String) The timestamp when the instance was created.hostname(String) The instance's internal DNS name (<label>.mq.<vpc-label>.<tenant-label>.<org-label>.fm.internal, the label being the name at create lowercased, every run of characters other thana-z0-9turned into one-,-trimmed at both ends and cut to 63 characters), resolvable inside its VPC; its TLS certificate is issued for this name. Fixed once assigned: a rename does not move it. Null on an instance without a certificate (it gets none retroactively; recreate it to get one).id(String) The unique identifier of the messaging instance.management_port(Number) The plaintext HTTP management/API port. Null whenrequire_tlsis true (the broker serves HTTPS management only).port(Number) The plaintext AMQP port. Null whenrequire_tlsis true (the broker refuses plaintext; connect with AMQPS onamqps_port).private_ip(String) The private IP address of the messaging instance.public_name(String) The instance's public DNS name undermq.svc.frostmoln.cloud. Null unless it has a public IP.status(String) The current status of the messaging instance.tags_all(Map of String) Every tag the platform holds on this resource: the provider'sdefault_tags, this resource's owntags(which win on a shared key), and any key set outside Terraform — in the portal, by the fm CLI, or stamped by the platform. Keys set outside Terraform appear only here and are kept on every apply, never removed.tls_enabled(Boolean) Whether the instance serves TLS: AMQPS onamqps_portand HTTPS management, with a certificate forhostnamefrom the Frostmoln customer CA (see thefrostmoln_ca_bundledata source). Plaintext AMQP and HTTP management are served beside it only whenrequire_tlsis false. False on an instance without a certificate.updated_at(String) The timestamp when the instance was last updated.
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").