Skip to main content

aws_db_parameter_group Resource

Use the aws_db_parameter_group InSpec audit resource to test properties of an AWS DB parameter group.

db_parameter_group_name (required)

This resource accepts a single parameter, the DB parameter group name. This can be passed either as a string or as a aws_db_parameter_group: 'value' key-value entry in a hash.

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

An aws_db_parameter_group resource block uses the parameter to select a parameter group.

describe aws_db_parameter_group(db_parameter_group_name: 'parameter-group-name-12345') do
  it { should exist }
end

Parameters

db_parameter_group_name (required)

This resource accepts a single parameter, the DB parameter group name. This can be passed either as a string or as a aws_db_parameter_group: 'value' key-value entry in a hash.

Properties

db_parameter_group_name
The name of the DB parameter group.
db_parameter_group_family
The name of the DB parameter group family that this DB parameter group is compatible with.
description
The customer-specified description for this DB parameter group.
db_parameter_group_arn
The Amazon Resource Name (ARN) for the DB parameter group.

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

Examples

Verify the group name of a DB parameter group.

describe aws_db_parameter_group(db_parameter_group_name: 'parameter-group-name-12345') do
  its('db_parameter_group_name')  { should eq 'parameter-group-name-12345' }
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 returns at least one result.

describe aws_db_parameter_group(db_parameter_group_name: 'parameter-group-name-12345') do
  it { should exist }
end

Use should_not to test the entity should not exist.

describe aws_db_parameter_group(db_parameter_group_name: 'parameter-group-name-6789') 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