terraform-aws-activemq
July 10, 2026 · View on GitHub
Terraform module -
It's 100% Open Source and licensed under the APACHE2.
Usage
This is a very basic example.

Include module.activemq.tf this repository as a module in your existing Terraform code:
module "activemq" {
source = "JamesWoolfenden/activemq/aws"
version = "v0.1.1"
subnet_ids = [element(tolist(data.aws_subnet_ids.private.ids), 0)]
vpc_id = element(tolist(data.aws_vpcs.main.ids), 0)
mq_broker = var.mq_broker
my_config = var.my_config
username = "NotAdmin"
password = random_password.password.result
}
Requirements
No requirements.
Providers
| Name | Version |
|---|---|
| aws | n/a |
Modules
No modules.
Resources
| Name | Type |
|---|---|
| aws_mq_broker.broker_instance | resource |
| aws_mq_configuration.broker | resource |
| aws_security_group.broker | resource |
Inputs
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| ingress | Ingress rules for the broker security group | list(any) | n/a | yes |
| kms_key_id | KMS key id for encryption (optional). Empty string disables custom key. | string | n/a | yes |
| maintenance_window_start_time | Describe the Maintenance window block | map(any) | { | no |
| mq_broker | MQ broker details | map(any) | n/a | yes |
| my_config | MQ Config | map(any) | n/a | yes |
| password | The password for the ActiveMQ user. This is sensitive and should be handled securely. | string | n/a | yes |
| publicly_accessible | Whether the broker should be publicly accessible | bool | false | no |
| security_group_name | Broker Security group name | string | "Broker" | no |
| subnet_ids | Contains subnet ids | list(any) | n/a | yes |
| username | The username for the ActiveMQ user. This is sensitive and should be handled securely. | string | "ExampleUser" | no |
| vpc_id | The VPC id | string | n/a | yes |
Outputs
| Name | Description |
|---|---|
| broker | The Broker details |
| configuration | The broker configuration |
| mq_password | MQ password |
| mq_username | MQ Username |
Policy
This is the policy required to build this project:
The Terraform resource required is:
# apply role — full permissions for terraform apply
resource "aws_iam_policy" "terraform_pike" {
name_prefix = "terraform_pike"
path = "/"
description = "Pike Autogenerated policy from IAC"
policy = jsonencode({
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:AuthorizeSecurityGroupEgress",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:CreateNetworkInterface",
"ec2:CreateNetworkInterfacePermission",
"ec2:CreateSecurityGroup",
"ec2:DeleteNetworkInterface",
"ec2:DeleteNetworkInterfacePermission",
"ec2:DeleteSecurityGroup",
"ec2:DescribeAccountAttributes",
"ec2:DescribeInternetGateways",
"ec2:DescribeNetworkInterfaces",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSubnets",
"ec2:DescribeVpcs",
"ec2:DetachNetworkInterface",
"ec2:RevokeSecurityGroupEgress",
"ec2:RevokeSecurityGroupIngress"
],
"Resource": [
"*"
]
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"kms:CreateGrant"
],
"Resource": [
"*"
]
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": [
"mq:CreateBroker",
"mq:CreateConfiguration",
"mq:CreateUser",
"mq:DeleteBroker",
"mq:DeleteConfiguration",
"mq:DeleteUser",
"mq:DescribeBroker",
"mq:DescribeConfiguration",
"mq:DescribeConfigurationRevision",
"mq:DescribeUser",
"mq:ListTags",
"mq:RebootBroker",
"mq:UpdateBroker",
"mq:UpdateConfiguration",
"mq:UpdateUser"
],
"Resource": [
"*"
]
}
]
})
}
# plan role — read-only permissions for terraform plan
resource "aws_iam_policy" "terraform_pike_plan" {
name_prefix = "terraform_pike_plan"
path = "/"
description = "Pike Autogenerated policy from IAC"
policy = jsonencode({
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:DescribeInternetGateways"
],
"Resource": [
"*"
]
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"mq:DescribeConfiguration",
"mq:ListTags"
],
"Resource": [
"*"
]
}
]
})
}
Related Projects
Check out these related projects.
- terraform-aws-s3 - S3 buckets
Help
Got a question?
File a GitHub issue.
Contributing
Bug Reports & Feature Requests
Please use the issue tracker to report any bugs or file feature requests.
Copyrights
Copyright © 2019-2026 James Woolfenden
License
See LICENSE for full details.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
