Skip to main content

aws_application_autoscaling_scalable_targets Resource

Use the aws_application_autoscaling_scalable_targets InSpec audit resource to test properties of multiple resourcese that Application Auto Scaling can scale.

For additional information, including details on parameters and properties, see the AWS ApplicationAutoScaling ScalableTarget documentation.

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

describe aws_application_autoscaling_scalable_targets( service_namespace: 'SERVICE_NAMESPACE' ) do
  it { should exist }
end

Parameters

service_namespace (required)

The namespace of the AWS service that provides the resource.

Properties

service_namespaces
The namespace of the AWS service that provides the resource.
resource_ids
The identifier of the resource associated with the scalable target.
scalable_dimensions
The scalable dimension associated with the scalable target.
min_capacities
The minimum value to scale to in response to a scale-in activity.
max_capacities
The maximum value to scale to in response to a scale-out activity.
role_arns
The ARN of an IAM role that allows Application Auto Scaling to modify the scalable target on your behalf.
creation_times
The Unix timestamp for when the scalable target was created.
suspended_states
The suspended state of the scalable target.

Examples

Ensure a service namespace is available.

describe aws_application_autoscaling_scalable_targets( service_namespace: 'SERVICE_NAMESPACE' ) do
  its('service_namespace') { should include 'ec2' }
end

Verify the minimum scale capacity.

describe aws_application_autoscaling_scalable_targets( service_namespace: 'SERVICE_NAMESPACE' ) do
    its('min_capacity') { should include 1 }
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_application_autoscaling_scalable_targets( service_namespace: 'SERVICE_NAMESPACE' ) do
  it { should exist }
end

be_available

Use should to check if the work_group name is available.

describe aws_application_autoscaling_scalable_targets( service_namespace: 'SERVICE_NAMESPACE' ) do
  it { should be_available }
end

AWS Permissions

Your Principal will need the ApplicationAutoScaling:Client:DescribeScalableTargetsResponse action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×











Search Results