Skip to main content

aws_ec2_vpn_gateway_route_propagation Resource

Use the aws_ec2_vpn_gateway_route_propagation InSpec audit resource to test if a virtual private gateway can propagate routes to a single AWS EC2 route table.

The AWS::EC2::TransitGatewayRouteTablePropagation resource enables a virtual private gateway (VGW) to propagate routes to the specified route table of a VPC.

For additional information, including details on parameters and properties, see the AWS documentation on AWS EC2 VPNGatewayRoutePropagation.

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 a route table ID exists.

describe aws_ec2_vpn_gateway_route_propagation(route_table_id: 'ROUTE_TABLE_ID') do
  it { should exist }
end

Parameters

transit_gateway_route_table_id (required)

The ID of the route table.

Properties

vpn_gateway_id
The ID of the virtual private gateway.
route_table_id
The ID of the route table.

Examples

Ensure a VPN gateway ID is available.

describe aws_ec2_vpn_gateway_route_propagation(route_table_id: 'ROUTE_TABLE_ID') do
  its('vpn_gateway_id') { should eq 'VPN_GATEWAY_ID' }
end

Ensure a route table ID is available.

describe aws_ec2_vpn_gateway_route_propagation(route_table_id: 'ROUTE_TABLE_ID') do
    its('route_table_id') { should eq 'ROUTE_TABLE_ID' }
end

Matchers

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

The controls will pass if the describe method returns at least one result.

exist

Use should to test that the entity exists.

describe aws_ec2_vpn_gateway_route_propagation(route_table_id: 'ROUTE_TABLE_ID') do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_ec2_vpn_gateway_route_propagation(route_table_id: 'ROUTE_TABLE_ID') do
  it { should_not exist }
end

be_available

Use should to check if the entity is available.

describe aws_ec2_vpn_gateway_route_propagation(route_table_id: 'ROUTE_TABLE_ID') do
  it { should be_available }
end

AWS Permissions

Your Principal will need the EC2:Client:DescribeRouteTablesResult action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×









Search Results