Provides an MQ Configuration Resource.
For more information on Amazon MQ, see Amazon MQ documentation.
resource "aws_mq_configuration" "example" {
description = "Example Configuration"
name = "example"
engine_type = "ActiveMQ"
engine_version = "5.17.6"
data = <<DATA
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<broker xmlns="http://activemq.apache.org/schema/core">
<plugins>
<forcePersistencyModeBrokerPlugin persistenceFlag="true"/>
<statisticsBrokerPlugin/>
<timeStampingBrokerPlugin ttlCeiling="86400000" zeroExpirationOverride="86400000"/>
</plugins>
</broker>
DATA
}
resource "aws_mq_configuration" "example" {
description = "Example Configuration"
name = "example"
engine_type = "RabbitMQ"
engine_version = "3.11.20"
data = <<DATA
# Default RabbitMQ delivery acknowledgement timeout is 30 minutes in milliseconds
consumer_timeout = 1800000
DATA
}
The following arguments are required:
data
- (Required) Broker configuration in XML format for ActiveMQ
or Cuttlefish format for RabbitMQ
. See official docs for supported parameters and format of the XML.engine_type
- (Required) Type of broker engine. Valid values are ActiveMQ
and RabbitMQ
.engine_version
- (Required) Version of the broker engine.name
- (Required) Name of the configuration.The following arguments are optional:
authentication_strategy
- (Optional) Authentication strategy associated with the configuration. Valid values are simple
and ldap
. ldap
is not supported for engine_type
RabbitMQ
.description
- (Optional) Description of the configuration.tags
- (Optional) Map of tags to assign to the resource. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.This resource exports the following attributes in addition to the arguments above:
arn
- ARN of the configuration.id
- Unique ID that Amazon MQ generates for the configuration.latest_revision
- Latest revision of the configuration.tags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.In Terraform v1.5.0 and later, use an import
block to import MQ Configurations using the configuration ID. For example:
import {
to = aws_mq_configuration.example
id = "c-0187d1eb-88c8-475a-9b79-16ef5a10c94f"
}
Using terraform import
, import MQ Configurations using the configuration ID. For example:
% terraform import aws_mq_configuration.example c-0187d1eb-88c8-475a-9b79-16ef5a10c94f