Skip to main content

aws_cloudfront_realtime_log_configs Resource

Use the aws_cloudfront_realtime_log_configs InSpec audit resource to test multiple AWS CloudFront real-time log configurations.

The AWS::CloudFront::RealtimeLogConfig resource creates a real-time log configuration.

For additional information, including details on parameters and properties, see the AWS documentation on AWS CloudFront RealtimeLogConfig..

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 config exists.

describe aws_cloudfront_realtime_log_configs do
  it { should exist }
end

Parameters

This resource does not require any parameters.

Properties

arns
The Amazon Resource Name (ARN) of this real-time log configuration.

Field: arn

names
The unique name of this real-time log configuration.

Field: name

sampling_rates
The sampling rate for this real-time log configuration.

Field: sampling_rate

end_points
Contains information about the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration.

Field: end_points

fields
A list of fields that are included in each real-time log record.

Field: fields

Examples

Ensure an ARN is available.

describe aws_cloudfront_realtime_log_configs do
  its('arns') { should include 'ARN' }
end

Ensure a name is available.

describe aws_cloudfront_realtime_log_configs do
    its('names') { should include 'CONFIG_NAME' }
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_realtime_log_configs do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_cloudfront_realtime_log_configs do
  it { should_not exist }
end

be_available

Use should to check if the entity is available.

describe aws_cloudfront_realtime_log_configs do
  it { should be_available }
end

AWS Permissions

Your Principal will need the CloudFront:Client:ListRealtimeLogConfigsResult action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×