Skip to main content

aws_rds_group_option Resource

Use the aws_rds_group_option InSpec audit resource to test detailed properties of an individual RDS cluster.An aws_rds_group_option 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.

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

For additional information, including details on parameters and properties, see the AWS documentation on RDS Option Group.


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.


Ensure if the option group exists

describe aws_rds_group_option('default:aurora-5-6') do
  it { should exist }
# Can also use hash syntax
describe aws_rds_group_option(option_group_name: 'default:aurora-5-6') do
  it { should exist }


option_group_name (required)

This resource accepts a single parameter, the user-supplied option_group_name. This parameter isn’t case-sensitive. This can be passed either as a string or as a option_group_name: 'value' key-value entry in a hash.


The name RDS option group.
The name of the database associated with each RDS cluster.
The name of the engine associated with each RDS cluster.
The major engine version of a option group.
The arn of a option group.
The vpc id of option group.
The storage allocated to each cluster.

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


Test the engine used with an aws_rds_group_option.

describe aws_rds_group_option(option_group_name: 'mysql') do
  its('engine_name')         { should eq 'mysql' }
  its('major_engine_version') { should eq '5.6.37' }

Test the options to allocated to an aws_rds_group_option.

describe aws_rds_group_option(option_group_name: 'mysql') do
  its('options.option_name') { should eq 'test' }
  its('options.permanent') { should eq true }


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_option(option_group_name: 'mysql') do
  it { should exist }
describe aws_rds_group_option(option_group_name: 'mysql') 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