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.
Installation
This resource is available in the Chef InSpec AWS resource pack.
See the Chef InSpec documentation on cloud platforms for information on configuring your AWS environment for InSpec and creating an InSpec profile that uses the InSpec AWS resource pack.
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
This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our Universal Matchers page.
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.
Was this page helpful?