aws_mq_brokers resource
Use the aws_mq_brokers InSpec audit resource to test the properties of multiple AWS MQ Broker.
Syntax
Ensure that AWS MQ Broker exists.
describe aws_mq_brokers do
it { should exist }
end
For additional information, see the AWS documentation on AWS MQ Broker.
Parameters
This resource does not require any parameters.
Properties
broker_arns- The broker’s Amazon Resource Name (ARN).
Field:
broker_arnbroker_names- The name of the broker. This value must be unique in your AWS account, 1-50 characters long, contain only letters, numbers, dashes, and underscores, and not contain white spaces, brackets, wildcard characters, or special characters.
Field:
broker_namebroker_states- The broker’s status.
Field:
broker_statecreated- Creation time of the broker profile.
Field:
createddeployment_modes- The deployment mode of the broker. Available values:
SINGLE_INSTANCE’,ACTIVE_STANDBY_MULTI_AZ, andCLUSTER_MULTI_AZ. Field:
deployment_modeengine_types- The type of broker engine. Currently, Amazon MQ supports
ACTIVEMQandRABBITMQ.. Field:
engine_typeengine_versions- The version of the broker engine.
Field:
engine_versionhost_instance_types- The broker’s instance type.
Field:
host_instance_type
Examples
Ensure a broker is available:
describe aws_mq_brokers do
its('broker_ids') { should include 'BROKER_ID' }
end
Ensure that the status is correct:
describe aws_mq_brokers do
its('broker_names') { should include 'BROKER_NAME' }
end
Matchers
For a full list of available matchers, see our Universal Matchers page.The control pass if the list method returns at least one result.
exist
Use should to test that the entity exists.
describe aws_mq_brokers do
it { should exist }
end
Use should_not to test the entity does not exist.
describe aws_mq_brokers do
it { should_not exist }
end
be_available
Use should to check if the AWS MQ broker is available.
describe aws_mq_brokers do
it { should be_available }
end
AWS Permissions
Your AWS principal will need the MQ:Client:ListBrokersResponse action with Effect set to Allow.