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.

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 AWS 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.

Thank you for your feedback!

×