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.
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_nameparameter_group_families- The family of the parameter group.
Field:
parameter_group_familydescriptions- The description of the parameter group.
Field:
description- 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 AWS 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.