Broker

class Broker : KotlinCustomResource

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, or configuration 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 as configuration or user, 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 the apply_immediately flag to instruct the service to apply the change immediately (see documentation below). Using apply_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

Link copied to clipboard

Specifies whether any broker modifications are applied immediately, or during the next maintenance window. Default is false.

Link copied to clipboard
val arn: Output<String>

ARN of the broker.

Link copied to clipboard

Authentication strategy used to secure the broker. Valid values are simple and ldap. ldap is not supported for engine_type RabbitMQ.

Link copied to clipboard

Whether to automatically upgrade to new minor versions of brokers as Amazon MQ makes releases available.

Link copied to clipboard
val brokerName: Output<String>

Name of the broker.

Link copied to clipboard

Configuration block for broker configuration. Applies to engine_type of ActiveMQ only. Detailed below.

Link copied to clipboard
val deploymentMode: Output<String>?

Deployment mode of the broker. Valid values are SINGLE_INSTANCE, ACTIVE_STANDBY_MULTI_AZ, and CLUSTER_MULTI_AZ. Default is SINGLE_INSTANCE.

Link copied to clipboard

Configuration block containing encryption options. Detailed below.

Link copied to clipboard
val engineType: Output<String>

Type of broker engine. Valid values are ActiveMQ and RabbitMQ.

Link copied to clipboard
val engineVersion: Output<String>

Version of the broker engine. See the AmazonMQ Broker Engine docs for supported versions. For example, 5.15.0.

Link copied to clipboard

Broker's instance type. For example, mq.t3.micro, mq.m5.large.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

List of information about allocated brokers (both active & standby).

Link copied to clipboard

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.)

Link copied to clipboard
val logs: Output<BrokerLogs>?

Configuration block for the logging configuration of the broker. Detailed below.

Link copied to clipboard

Configuration block for the maintenance window start time. Detailed below.

Link copied to clipboard

Whether to enable connections from applications outside of the VPC that hosts the broker's subnets.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val securityGroups: Output<List<String>>?

List of security group IDs assigned to the broker.

Link copied to clipboard
val storageType: Output<String>

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.

Link copied to clipboard
val subnetIds: Output<List<String>>

List of subnet IDs in which to launch the broker. A SINGLE_INSTANCE deployment requires one subnet. An ACTIVE_STANDBY_MULTI_AZ deployment requires multiple subnets.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Map of tags to assign to the broker. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val users: Output<List<BrokerUser>>

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: