Skip to main content

aws_ec2_spot_fleets Resource

Use the aws_ec2_spot_fleets InSpec audit resource to test properties of the plural AWS EC2 Spot Fleet.

The AWS::EC2::SpotFleet resource specifies a Spot Fleet request. A Spot Fleet request contains the configuration information to launch a fleet, or group, of instances.

For additional information, including details on parameters and properties, see the AWS documentation on AWS EC2 Spot Fleet..

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

Ensure that spot fleets exists.

describe aws_ec2_spot_fleets do
  it { should exist }
end

Parameters

This resource does not require any parameters.

Properties

activity_statuses
The progress of the Spot Fleet request.

Field: activity_status

create_times
The creation date and time of the request.

Field: create_time

spot_fleet_request_configs
The configs of the Spot Fleet request.

Field: spot_fleet_request_config

spot_fleet_request_ids
The ID of the Spot Fleet request.

Field: spot_fleet_request_id

spot_fleet_request_states
The state of the Spot Fleet request.

Field: spot_fleet_request_state

tags
The tags for a Spot Fleet resource.

Field: tags

Examples

Ensure an activity status is there.

describe aws_ec2_spot_fleets do
  its('activity_statuses') { should include 'error' }
end

Ensure that the state is active.

describe aws_ec2_spot_fleets do
    its('spot_fleet_request_states') { should include 'available' }
end

Matchers

This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit 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_ec2_spot_fleets do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_ec2_spot_fleets do
  it { should_not exist }
end

AWS Permissions

Your Principal will need the EC2:Client:DescribeSpotFleetRequestsResponse action with Effect set to Allow.

Edit this page on GitHub.

Thank you for your feedback!

×









Search Results