Skip to main content

aws_network_firewall_firewall_policies resource

Use the aws_network_firewall_firewall_policies InSpec audit resource to test properties of multiple AWS Network Firewall Policy.

The firewall defines the configuration settings for an AWS Network Firewall firewall. The settings include the firewall policy, the subnets in your VPC to use for the firewall endpoints, and any tags that are attached to the firewall AWS resource.

For additional information, including details on parameters and properties, see the AWS documentation on AWS Network Firewall Policy.

Syntax

Ensure that the policy exists.

describe aws_network_firewall_firewall_policies do
  it { should exist }
end

Parameters

This resource does not require any parameters.

Properties

firewall_names
The descriptive name of the firewall.

Field: firewall_name

firewall_arns
The Amazon Resource Name (ARN) of the firewall.

Field: firewall_arn

Examples

Ensure a policy name is available:

describe aws_network_firewall_firewall_policies do
  its('names') { should include 'FIREWALL_NAME' }
end

Ensure that the policy arn is available:

describe aws_network_firewall_firewall_policies do
    its('arns') { should include 'POLICY_ARN' }
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_network_firewall_firewall_policies do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_network_firewall_firewall_policies do
  it { should_not exist }
end

AWS Permissions

Your AWS principal will need the NetworkFirewall:Client:ListFirewallPoliciesResponse action with Effect set to Allow.

Thank you for your feedback!

×