Skip to main content

aws_db_parameter_groups Resource

Use the aws_db_parameter_groups InSpec audit resource to test properties of a collection of AWS DB parameter groups.

This resource does not expect any parameters.

For additional information, including details on parameters and properties, see the AWS documentation on DB parameter groups.

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 you have exactly three DB parameter groups:

describe aws_db_parameter_groups do
  its('db_parameter_group_names.count') { should cmp 3 }
end

Parameters

This resource does not require any parameters.

Properties

db_parameter_group_names
The name of the DB parameter group.
db_parameter_group_families
The name of the DB parameter group family that this DB parameter group is compatible with.
descriptions
Provides the customer-specified description for this DB parameter group.
db_parameter_group_arns
The Amazon Resource Name (ARN) for the DB parameter group.

For a comprehensive list of properties available, see the API reference documentation

Examples

Ensure the group name of a DB parameter group exists.

describe aws_db_parameter_groups do
  its('db_parameter_group_names') { should include 'parameter-group-name' }
end

Matchers

For a full list of available matchers, see our Universal Matchers page.

This resource has the following special matchers.

exist

The control will pass if the describe method returns at least one result.

describe aws_db_parameter_groups.where( <property>: <value> ) do
  it { should exist }
end

Use should_not to test the entity should not exist.

describe aws_db_parameter_groups.where( <property>: <value> ) do
  it { should_not exist }
end

AWS Permissions

Your Principal will need the RDS:Client:DBParameterGroupsMessage action with Effect set to Allow.

You can find detailed documentation at Actions, Resources, and Condition Keys for Amazon RDS.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results