Skip to main content

aws_redshift_cluster_parameter_groups Resource

Use the aws_redshift_cluster_parameter_groups InSpec audit resource to test properties of some or all AWS Redshift cluster parameter groups.

This resource does not expect any parameters.

For additional information, including details on parameters and properties, see the AWS documentation on Redshift cluster parameter group.

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

Verify that a Parameter group name exists.

describe aws_redshift_cluster_parameter_groups do
  it { should exist }
end

Parameters

This resource does not require any parameters.

Properties

parameter_group_names
The name of a specific parameter group for which to return details. By default, details about all parameter groups and the default parameter group are returned.

Field: parameter_group_name

parameter_group_families
The family of the parameter group.

Field: parameter_group_family

descriptions
The description of the parameter group.

Field: description

tags
The tags of the parameter group.

Field: tags

Examples

Ensure a Redshift cluster parameter group has parameter groups.

describe aws_redshift_cluster_parameter_groups do
  it { should exist }
end

Verify the number of Redshift cluster parameter groups.

describe aws_redshift_cluster_parameter_groups do
    its('count') { should eq 5 }
end

Verify the family name exists for at least one of the cluster parameter groups.

describe aws_redshift_cluster_parameter_groups do
   its('parameter_group_families') { should include "FAMILY_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 returns at least one result.

describe aws_redshift_cluster_parameter_groups do
  it { should exist }
end

Use should_not to test the entity should not exist.

describe aws_redshift_cluster_parameter_groups do
  it { should_not exist }
end

AWS Permissions

Your Principal will need the Redshift:Client:ClusterParameterGroupsMessage action with Effect set to Allow.

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

Edit this page on GitHub

Thank you for your feedback!

×










Search Results