Home

Awesome

terraform-aws-activemq

Build Status Latest Release GitHub tag (latest SemVer) Terraform Version Infrastructure Tests pre-commit checkov Infrastructure Tests

Terraform module -


It's 100% Open Source and licensed under the APACHE2.

Usage

This is a very basic example.

alt text

Include module.activemq.tf this repository as a module in your existing Terraform code:

module "activemq" {
  source      = "JamesWoolfenden/activemq/aws"
  version     = "v0.1.1"
  common_tags = var.common_tags
  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
}
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

Requirements

No requirements.

Providers

NameVersion
<a name="provider_aws"></a> awsn/a

Modules

No modules.

Resources

NameType
aws_mq_broker.brokerresource
aws_mq_configuration.brokerresource
aws_security_group.brokerresource

Inputs

NameDescriptionTypeDefaultRequired
<a name="input_audit"></a> auditTo enable audit loggingbool"false"no
<a name="input_common_tags"></a> common_tagsThis is to help you add tags to your cloud objectsmap(any)n/ayes
<a name="input_ingress"></a> ingressn/alist(any)n/ayes
<a name="input_kms_key_id"></a> kms_key_idn/aanyn/ayes
<a name="input_maintenance_window_start_time"></a> maintenance_window_start_timeDescribe the Maintenance window blockmap(any)<pre>{<br> "day_of_week": "MONDAY",<br> "time_of_day": "12:05",<br> "time_zone": "GMT"<br>}</pre>no
<a name="input_mq_broker"></a> mq_brokerMQ broker detailsmap(any)n/ayes
<a name="input_my_config"></a> my_configMQ Configmap(any)n/ayes
<a name="input_password"></a> passwordn/astringn/ayes
<a name="input_security_group_name"></a> security_group_nameBroker Security group namestring"Broker"no
<a name="input_subnet_ids"></a> subnet_idsContains subnet idslist(any)n/ayes
<a name="input_username"></a> usernamen/astring"ExampleUser"no
<a name="input_vpc_id"></a> vpc_idThe VPC idstringn/ayes

Outputs

NameDescription
<a name="output_broker"></a> brokerThe Broker details
<a name="output_configuration"></a> configurationThe broker configuration
<a name="output_mq_password"></a> mq_passwordMQ password
<a name="output_mq_username"></a> mq_usernameMQ Username
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

Policy

This is the policy required to build this project:

<!-- BEGINNING OF PRE-COMMIT-PIKE DOCS HOOK -->

The Terraform resource required is:

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:CreateTags",
                "ec2:DeleteNetworkInterface",
                "ec2:DeleteNetworkInterfacePermission",
                "ec2:DeleteSecurityGroup",
                "ec2:DeleteTags",
                "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:CreateTags",
                "mq:CreateUser",
                "mq:DeleteBroker",
                "mq:DeleteTags",
                "mq:DeleteUser",
                "mq:DescribeBroker",
                "mq:DescribeConfiguration",
                "mq:DescribeConfigurationRevision",
                "mq:DescribeUser",
                "mq:RebootBroker",
                "mq:UpdateBroker",
                "mq:UpdateConfiguration",
                "mq:UpdateUser"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
})
}


<!-- END OF PRE-COMMIT-PIKE DOCS HOOK -->

Related Projects

Check out these related projects.

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-2023 James Woolfenden

License

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.

Contributors

James Woolfenden<br/>James Woolfenden