Broker
Provides an Amazon MQ broker resource. This resources also manages users for the broker.
For more information on Amazon MQ, see Amazon MQ documentation. NOTE: Amazon MQ currently places limits on RabbitMQ brokers. For example, a RabbitMQ broker cannot have: instances with an associated IP address of an ENI attached to the broker, an associated LDAP server to authenticate and authorize broker connections, storage type
EFS
, audit logging, orconfiguration
blocks. Although this resource allows you to create RabbitMQ users, RabbitMQ users cannot have console access or groups. Also, Amazon MQ does not return information about RabbitMQ users so drift detection is not possible. NOTE: Changes to an MQ Broker can occur when you change a parameter, such asconfiguration
oruser
, and are reflected in the next maintenance window. Because of this, the provider may report a difference in its planning phase because a modification has not yet taken place. You can use theapply_immediately
flag to instruct the service to apply the change immediately (see documentation below). Usingapply_immediately
can result in a brief downtime as the broker reboots.
Example Usage
Basic Example
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.mq.Broker;
import com.pulumi.aws.mq.BrokerArgs;
import com.pulumi.aws.mq.inputs.BrokerConfigurationArgs;
import com.pulumi.aws.mq.inputs.BrokerUserArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Broker("example", BrokerArgs.builder()
.configuration(BrokerConfigurationArgs.builder()
.id(aws_mq_configuration.test().id())
.revision(aws_mq_configuration.test().latest_revision())
.build())
.engineType("ActiveMQ")
.engineVersion("5.15.9")
.hostInstanceType("mq.t2.micro")
.securityGroups(aws_security_group.test().id())
.users(BrokerUserArgs.builder()
.username("ExampleUser")
.password("MindTheGap")
.build())
.build());
}
}
High-throughput Optimized Example
This example shows the use of EBS storage for high-throughput optimized performance.
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.mq.Broker;
import com.pulumi.aws.mq.BrokerArgs;
import com.pulumi.aws.mq.inputs.BrokerConfigurationArgs;
import com.pulumi.aws.mq.inputs.BrokerUserArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Broker("example", BrokerArgs.builder()
.configuration(BrokerConfigurationArgs.builder()
.id(aws_mq_configuration.test().id())
.revision(aws_mq_configuration.test().latest_revision())
.build())
.engineType("ActiveMQ")
.engineVersion("5.15.9")
.storageType("ebs")
.hostInstanceType("mq.m5.large")
.securityGroups(aws_security_group.test().id())
.users(BrokerUserArgs.builder()
.username("ExampleUser")
.password("MindTheGap")
.build())
.build());
}
}
Import
MQ Brokers can be imported using their broker id, e.g.,
$ pulumi import aws:mq/broker:Broker example a1b2c3d4-d5f6-7777-8888-9999aaaabbbbcccc
Properties
Specifies whether any broker modifications are applied immediately, or during the next maintenance window. Default is false
.
Authentication strategy used to secure the broker. Valid values are simple
and ldap
. ldap
is not supported for engine_type
RabbitMQ
.
Whether to automatically upgrade to new minor versions of brokers as Amazon MQ makes releases available.
Name of the broker.
Configuration block for broker configuration. Applies to engine_type
of ActiveMQ
only. Detailed below.
Deployment mode of the broker. Valid values are SINGLE_INSTANCE
, ACTIVE_STANDBY_MULTI_AZ
, and CLUSTER_MULTI_AZ
. Default is SINGLE_INSTANCE
.
Configuration block containing encryption options. Detailed below.
Type of broker engine. Valid values are ActiveMQ
and RabbitMQ
.
Version of the broker engine. See the AmazonMQ Broker Engine docs for supported versions. For example, 5.15.0
.
Broker's instance type. For example, mq.t3.micro
, mq.m5.large
.
List of information about allocated brokers (both active & standby).
Configuration block for the LDAP server used to authenticate and authorize connections to the broker. Not supported for engine_type
RabbitMQ
. Detailed below. (Currently, AWS may not process changes to LDAP server metadata.)
Configuration block for the logging configuration of the broker. Detailed below.
Configuration block for the maintenance window start time. Detailed below.
Whether to enable connections from applications outside of the VPC that hosts the broker's subnets.
List of security group IDs assigned to the broker.
Storage type of the broker. For engine_type
ActiveMQ
, the valid values are efs
and ebs
, and the AWS-default is efs
. For engine_type
RabbitMQ
, only ebs
is supported. When using ebs
, only the mq.m5
broker instance type family is supported.
Configuration block for broker users. For engine_type
of RabbitMQ
, Amazon MQ does not return broker users preventing this resource from making user updates and drift detection. Detailed below. The following arguments are optional: