aws_redshift_cluster_parameter_group Resource
Use the aws_redshift_cluster_parameter_group
InSpec audit resource to test properties of a single specific Redshift cluster parameter group.
A Redshift cluster parameter group is uniquely identified by the parameter group name.
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
Ensure that a parameter_group_name exists.
describe aws_redshift_cluster_parameter_group(parameter_group_name: 'test') do
it { should exist }
end
Parameters
parameter_group_name
(required)
Properties
parameter_group_name
- 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.
parameter_group_family
- The family of the parameter group.
description
- The description of the parameter group.
tags
- The tags of the parameter group.
Examples
Ensure a parameter group name is available.
describe aws_redshift_cluster_parameter_group(parameter_group_name: 'test') do
its('parameter_group_name') { should eq 'test' }
end
Check the family name in the cluster parameter group.
describe aws_redshift_cluster_parameter_group(parameter_group_name: 'test') do
its('parameter_group_family') { should eq 'family_name' }
end
Matchers
For a full list of available matchers, see our Universal Matchers page.The controls will pass if the describe
method returns at least one result.
exist
Use should
to test that the entity exists.
describe aws_redshift_cluster_parameter_group(parameter_group_name: 'test') do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_redshift_cluster_parameter_group(parameter_group_name: 'test') do
it { should_not exist }
end
be_available
Check if the IP address is available.
describe aws_redshift_cluster_parameter_group(parameter_group_name: 'test') do
it { should be_available }
end
Use should_not
to test an IP address that should not exist.
describe aws_redshift_cluster_parameter_group(parameter_group_name: 'test') do
it { should_not be_available }
end
AWS Permissions
Your Principal will need the Redshift:Client:ClusterParameterGroupsMessage
action with Effect
set to Allow
.
See the Actions, Resources, and Condition Keys for Amazon EC2 documentation for additional information.