title | platform |
---|---|
About the aws_ec2_prefix_lists Resource |
aws |
Use the aws_ec2_prefix_lists
InSpec audit resource to test properties of multiple AWS EC2 prefix lists.
The AWS::EC2::PrefixList
resource specifies a managed prefix list.
Ensure that a prefix list exists.
describe aws_ec2_prefix_lists do
it { should exist }
end
This resource does not require any parameters.
For additional information, see the AWS documentation on AWS EC2 prefix lists.
Property | Description | Description |
---|---|---|
prefix_list_ids | The ID of the prefix list. | prefix_list_id |
address_families | The IP address version. | address_family |
states | The state of the prefix list. | state |
state_messages | The state message. | state_message |
prefix_list_arns | The Amazon Resource Name (ARN) for the prefix list. | prefix_list_arn |
prefix_list_names | The name of the prefix list. | prefix_list_name |
max_entries | The maximum number of entries for the prefix list. | max_entries |
versions | The version of the prefix list. | version |
tags | The tags for the prefix list. | tags |
owner_ids | The ID of the owner of the prefix list. | owner_id |
describe aws_ec2_prefix_lists do
its('prefix_list_ids') { should include 'PREFIX_LIST_ID' }
end
describe aws_ec2_prefix_lists do
its('address_families') { should include 'ADDRESS_FAMILY' }
end
describe aws_ec2_prefix_lists do
its('states') { should include 'AVAILABLE' }
end
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.
Use should
to test that the entity exists.
describe aws_ec2_prefix_lists do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_ec2_prefix_lists do
it { should_not exist }
end
Your Principal will need the EC2:Client:DescribeManagedPrefixListsResult
action with Effect
set to Allow
.