aws_cloudfront_streaming_distributions Resource
Use the aws_cloudfront_streaming_distributions InSpec audit resource to test plural properties of AWS CloudFront streaming distribution.
For additional information, including details on parameters and properties, see the AWS documentation on AWS CloudFront streaming distribution..
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 the distribution exists.
describe aws_cloudfront_streaming_distributions do
it { should exist }
end
Parameters
This resource does not require any parameters.
Properties
ids- The streaming distribution’s ID.
Field:
idarns- The ARN (Amazon Resource Name) for the distribution.
Field:
arnstatuses- The current status of the RTMP distribution.
Field:
statuslast_modified_time- The date and time that the distribution was last modified.
Field:
last_modified_timedomain_names- The domain name corresponding to the distribution.
Field:
domain_namess3_origins- A complex type that contains information about the Amazon S3 bucket from which you want CloudFront to get your media files for distribution.
Field:
s3_originaliases- A complex type that contains information about CNAMEs (alternate domain names), if any, for this streaming distribution.
Field:
aliasestrusted_signers- A complex type that specifies the accounts.
Field:
trusted_signerscomments- The comment originally specified when this distribution was created.
Field:
commentprice_classes- A complex type that contains information about price class for this streaming distribution.
Field:
price_classenabled- Whether the distribution is enabled to accept end user requests for content.
Field:
enabled
Examples
Ensure an ID is available.
describe aws_cloudfront_streaming_distributions do
its('ids') { should include 'ID' }
end
Ensure a status is Deployed.
describe aws_cloudfront_streaming_distributions do
its('statuses') { should include 'Deployed' }
end
Matchers
For a full list of available matchers, see our Universal Matchers page.The controls will pass if the list method returns at least one result.
exist
Use should to test that the entity exists.
describe aws_cloudfront_streaming_distributions do
it { should exist }
end
Use should_not to test the entity does not exist.
describe aws_cloudfront_streaming_distributions do
it { should_not exist }
end
AWS Permissions
Your Principal will need the CloudFront:Client:ListStreamingDistributionsResult action with Effect set to Allow.