Skip to main content

aws_network_manager_customer_gateway_associations Resource

Use the aws_network_manager_customer_gateway_associations InSpec audit resource to test properties of multiple AWS Network Manager customer gateway associations.

The AWS::NetworkManager::CustomerGatewayAssociation resource specifies an association between a customer gateway, a device, and optionally, a link.

For additional information, including details on parameters and properties, see the AWS documentation on AWS Network Manager Customer Gateway Association..

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 customer gateway association exists.

describe aws_network_manager_customer_gateway_associations(global_network_id: "GLOBAL_NETWORK_ID") do
  it { should exist }
end

Parameters

global_network_id (required)

The ID of the global network.

Properties

customer_gateway_arns
The Amazon Resource Name (ARN) of the customer gateway.

Field: customer_gateway_arn

global_network_ids
The ID of the global network.

Field: global_network_id

device_ids
The ID of the device.

Field: device_id

link_ids
The ID of the link.

Field: link_id

states
The association state.

Field: state

Examples

Ensure a customer gateway arn is available.

describe aws_network_manager_customer_gateway_association(global_network_id: 'GLOBAL_NETWORK_ID') do
  its('customer_gateway_arns') { should include 'CustomerGatewayARN' }
end

Ensure that the state is active.

describe aws_network_manager_customer_gateway_association(global_network_id: 'GLOBAL_NETWORK_ID') do
    its('states') { should include 'AVAILABLE' }
end

Matchers

For a full list of available matchers, see our Universal Matchers page.

This resource has the following special matchers.

exist

Use should to test that the entity exists.

describe aws_network_manager_customer_gateway_association(global_network_id: 'GLOBAL_NETWORK_ID') do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_network_manager_customer_gateway_association(global_network_id: "dummy") do
  it { should_not exist }
end

AWS Permissions

Your Principal will need the NetworkManager:Client:GetCustomerGatewayAssociationsResponse action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results