aws_mq_configuration Resource
Use the aws_mq_configuration
InSpec audit resource to test the properties of a single specific AWS MQ configuration.
For additional information, including details on parameters and properties, see the AWS documentation on AWS MQ configuration.
Install
This resource is available in the Chef InSpec AWS resource pack.
For information on configuring your AWS environment for Chef InSpec and creating an InSpec profile that uses the InSpec AWS resource pack, see the Chef InSpec documentation on the AWS cloud platform.
Syntax
Ensure that AWS MQ configuration exists.
describe aws_mq_configuration(configuration_id: 'configuration_id') do
it { should exist }
end
Parameters
configuration_id
(required)
configuration_id
- The configuration ID.
Properties
arn
- The ARN of the configuration.
Field:
arn
authentication_strategy
- The authentication strategy associated with the configuration. The default is SIMPLE.
Field:
authentication_strategy
created
- The date and time of the configuration revision.
Field:
Created
description
- The description of the configuration.
Field:
description
engine_type
- The type of broker engine. Currently, Amazon MQ supports ACTIVEMQ and RABBITMQ.
Field:
engine_type
engine_version
- The broker engine’s version. For a list of supported engine versions.
Field:
engine_version
id
- The unique ID that Amazon MQ generates for the configuration.
Field:
id
name
- The name of the configuration.
Field:
name
tags
- The list of all tags associated with this configuration.
Field:
tags
Examples
Ensure a configuration id is available.
describe aws_mq_configuration(configuration_id: 'configuration_id') do
its('configuration_id') { should eq 'configuration_id' }
end
Ensure a configuration name is available.
describe aws_mq_configuration(configuration_id: 'configuration_id') do
its('configuration_name') { should eq 'configuration_name' }
end
Matchers
For a full list of available matchers, see our Universal Matchers page.The controls will pass if the describe
method returns at least one result.
exist
Use should
to test that the entity exists.
describe aws_mq_configuration(configuration_id: 'configuration_id') do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_mq_configuration(configuration_id: 'dummy') do
it { should_not exist }
end
be_available
Use should
to check if the mq configuration is available.
describe aws_mq_configuration(configuration_id: 'configuration_id') do
it { should be_available }
end
AWS Permissions
Your Principal will need the MQ:Client:DescribeConfigurationResponse
action with Effect
set to Allow
.