Skip to main content

aws_ssm_parameters Resource

Use the aws_ssm_parameters InSpec audit resource to test properties of a collection of AWS SSM parameters.

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 you have exactly 3 SSM Parameters

describe aws_ssm_parameters do
  its('names.count') { should cmp 3 }
end

Parameters

This resource does not require any parameters.

Properties

names
Provides the name of the parameter.
types
Provides the type of the parameter.
key_ids
Provides the key id of the parameter.
last_modified_dates
Provides the date the parameter was last changed or updated and the parameter version was created.
last_modified_users
Provides the user that last changed or updated the parameter.
descriptions
Provides the description of the parameter.
versions
Provides the version of the parameter.
tiers
Provides the tier of the parameter.

For a comprehensive list of properties available, see the API reference documentation

Examples

Ensure Name of a SSM Parameter exists.

describe aws_ssm_parameters do
  its('names') { should include 'ssm-parameter-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.

Use should_not to test the entity should not exist.

describe aws_ssm_parameters.where( <property>: <value> ) do
  it { should exist }
end
describe aws_ssm_parameters.where( <property>: <value> ) do
  it { should_not exist }
end

AWS Permissions

Your Principal will need the SSM:Client:DescribeParametersResult action with Effect set to Allow.

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

Edit this page on GitHub

Thank you for your feedback!

×









Search Results