terraform-aws-arc-mq-broker¶
Overview¶
SourceFuse AWS Reference Architecture (ARC) Terraform module provides an easy and scalable way to deploy and manage Amazon MQ brokers. It supports various deployment options and configurations, including engine types (ActiveMQ and RabbitMQ), instance classes, storage types, and security settings. The module simplifies the setup of brokers for message-oriented middleware with high availability and fault tolerance.
Usage¶
See the example
folder for a working module example.
Requirements¶
Name | Version |
---|---|
terraform | >= 1.5.0 |
aws | ~> 5.0 |
random | >= 3.0 |
Providers¶
Name | Version |
---|---|
aws | 5.80.0 |
random | 3.6.3 |
Modules¶
Name | Source | Version |
---|---|---|
arc_security_group | git::git@github.com:sourcefuse/terraform-aws-arc-security-group.git | 0.0.1 |
Resources¶
Name | Type |
---|---|
aws_mq_broker.active-mq | resource |
aws_mq_broker.rabbit-mq | resource |
aws_ssm_parameter.replication_user | resource |
aws_ssm_parameter.replication_user_password | resource |
aws_ssm_parameter.user_name | resource |
aws_ssm_parameter.user_password | resource |
random_password.mq_broker | resource |
Inputs¶
Name | Description | Type | Default | Required |
---|---|---|---|---|
apply_immediately | Whether changes should be applied immediately. | bool |
true |
no |
auto_minor_version_upgrade | Indicates whether minor engine upgrades are applied automatically to the instance during the maintenance window. | bool |
true |
no |
broker_type | Specify the broker type: RabbitMQ or ActiveMQ | string |
"RabbitMQ" |
no |
data_replication_primary_broker_arn | The ARN of the primary broker for data replication | string |
"" |
no |
deployment_mode | Deployment mode for the RabbitMQ or ActiveMQ broker. | string |
"SINGLE_INSTANCE" |
no |
enable_data_replication | Enable or disable data replication for the broker | bool |
false |
no |
enable_logging | Enable general logging for the RabbitMQ broker. | bool |
false |
no |
encryption_options | Encryption options for the resource. | object({ |
{ |
no |
engine_version | Version of the RabbitMQ or ActiveMQ engine. | string |
"3.8.26" |
no |
environment | Name of the environment, i.e. dev, stage, prod | string |
"dev" |
no |
host_instance_type | Instance type for the RabbitMQ or ActiveMQ broker. | string |
"mq.t3.micro" |
no |
ldap_config | Configuration for LDAP server | object({ |
{ |
no |
maintenance_window | Maintenance window configuration including day, time, and time zone. | object({ |
{ |
no |
name | Name of the RabbitMQ or ActiveMQ broker. | string |
n/a | yes |
namespace | Namespace of the project, i.e. arc | string |
"arc" |
no |
publicly_accessible | Whether the RabbitMQ or ActiveMQ broker is publicly accessible. | bool |
false |
no |
security_group_data | (optional) Security Group data | object({ |
{ |
no |
storage_type | Storage type for the RabbitMQ or ActiveMQ or ActiveMQ broker. | string |
"ebs" |
no |
subnet_ids | List of subnet IDs for the RabbitMQ or ActiveMQ broker. | list(string) |
[] |
no |
tags | Tags to apply to resources | map(string) |
n/a | yes |
users | List of users for the ActiveMQ broker | object({ |
{} |
no |
users_replica | List of users for the ActiveMQ broker | object({ |
{} |
no |
vpc_id | The VPC ID for the VPC endpoint. | string |
null |
no |
Outputs¶
Name | Description |
---|---|
broker_id | The ID of the MQ broker (RabbitMQ or ActiveMQ) based on the broker type. |
replication_user_password_ssm_parameter | The SSM parameter storing the replication user password for ActiveMQ. |
security_group_id | The ID of the created security group for brokerMQ. |
user_password_ssm_parameter | The SSM parameter storing the brokerMQ user password. |
user_ssm_parameter | The SSM parameter storing the brokerMQ username. |
Versioning¶
This project uses a .version
file at the root of the repo which the pipeline reads from and does a git tag.
When you intend to commit to main
, you will need to increment this version. Once the project is merged,
the pipeline will kick off and tag the latest git commit.
Development¶
Prerequisites¶
Configurations¶
- Configure pre-commit hooks
Versioning¶
while Contributing or doing git commit please specify the breaking change in your commit message whether its major,minor or patch
For Example
Tests¶
- Tests are available in
test
directory - Configure the dependencies
- Now execute the test
Authors¶
This project is authored by: - SourceFuse ARC Team