Skip to main content

aws_waf_web_acls resource

Use the aws_waf_web_acls InSpec audit resource to test the properties of multiple of AWS WAF WebACL.

The AWS::WAFv2::WebACL AWS resource defines a collection of rules to use to inspect and control web requests.

For additional information, including details on parameters and properties, see the AWS documentation on the AWS::WAFv2::WebACL resource.

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 web ACL exists.

describe aws_waf_web_acls do
  it { should exist }
end

Parameters

No required parameters.

Properties

web_acl_ids
The unique identifier for the web ACL.

Field: web_acl_id

names
The name of the web ACL.

Field: name

Examples

Ensure a web ACL is available.

describe aws_waf_web_acls do
  its('web_acl_ids') { should include 'WEB_ACL_ID' }
end

Ensure a web ACL name is available..

describe aws_waf_web_acls do
    its('names') { should include 'WEB_ACL_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_waf_web_acls do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_waf_web_acls do
  it { should_not exist }
end

be_available

Use should to check if the entity is available.

describe aws_waf_web_acls do
  it { should be_available }
end

AWS Permissions

Your Principal will need the WAF:Client:ListWebACLsResponse action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results