Skip to main content

aws_rds_group_options Resource

Use the aws_rds_group_options InSpec audit resource to test detailed properties of a group of Amazon Relational Database Service (RDS) clusters.

RDS gives you access to the capabilities of a MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, Oracle, or Amazon Aurora database server.


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.


An aws_rds_group_options resource block uses resource parameters to search for an RDS option group, and then tests that RDS option group. If no RDS option group match, no error is raised, but the exists matcher will return false and all properties will be nil. describe aws_rds_group_option(engine_name: ‘mysql’) do it { should exist } end

# Can also use hash syntax
describe aws_rds_group_options do
  it { should exist }


This resource does not require any parameters.


The name RDS option group.

Field: option_group_name

The name of the database associated with each RDS cluster.

Field: option_group_description

The name of the engine associated with each RDS cluster.

Field: engine_name

The major engine version of a option group.

Field: major_engine_version

The arn of a option group.

Field: option_group_arn

The vpc id of option group.

Field: vpc_id

The storage allocated to each cluster.

Field: allows_vpc_and_non_vpc_instance_memberships See the AWS documentation on RDS cluster.

For a comprehensive list of properties available to test on an RDS cluster see the AWS Response Object.


Test the engine used with an aws_rds_group_option.

describe aws_rds_group_options do
  its('engine_name')         { should include 'mysql' }
  its('major_engine_version') { should include '5.6.37' }

Ensure a specific cluster exists.

describe aws_rds_group_options do
  its('option_group_name') { should include 'option_group_name8-test }

Use the InSpec resource to request the IDs of all RDS clusters, then test in-depth using aws_rds_cluster to ensure all clusters are encrypted and have a sensible size.

aws_rds_group_options.option_group_name.each do |option_group_name|
    describe  aws_rds_group_option(option_group_name) do
      it { should exist }


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

This resource has the following special matchers.


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

Use should_not to test the entity should not exist.

describe aws_rds_group_options do
  it { should exist }
describe aws_rds_group_options do
  it { should_not exist }

AWS Permissions

Your Principal will need the RDS:Client:OptionGroups 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