Skip to main content

aws_ec2_transit_gateway_route_table_propagations Resource

Use the aws_ec2_transit_gateway_route_table_propagations InSpec audit resource to test properties of multiple propagation routes between Transit Gateway attachments and a Transit Gateway route table.

The AWS::EC2::TransitGatewayRouteTablePropagation resource enables the specified attachment to propagate routes to the specified propagation route table.

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

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 Transit Gateway route table id exists.

describe aws_ec2_transit_gateway_route_table_propagations(transit_gateway_route_table_id: 'TRANSIT_GATEWAY_ROUTE_TABLE_ID') do
  it { should exist }
end

Parameters

transit_gateway_route_table_id (required)

The ID of the Transit Gateway route table.

Properties

transit_gateway_attachment_ids
A list of the attachment IDs.

Field: transit_gateway_attachment_id

resource_ids
A list of the resource IDs.

Field: resource_id

resource_types
A list of the resource types.

Field: resource_type

states
A list of the resource states.

Field: state

Examples

Ensure that a Transit Gateway attachment ID is available.

describe aws_ec2_transit_gateway_route_table_propagations(transit_gateway_route_table_id: 'TRANSIT_GATEWAY_ROUTE_TABLE_ID') do
  its('transit_gateway_attachment_ids') { should include 'TRANSIT_GATEWAY_ROUTE_TABLE_ID' }
end

Ensure that a propagation route is enabled.

describe aws_ec2_transit_gateway_route_table_propagations(transit_gateway_route_table_id: 'TRANSIT_GATEWAY_ROUTE_TABLE_ID') do
    its('states') { should include 'enabled' }
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 an entity exists.

describe aws_ec2_transit_gateway_route_table_propagations(transit_gateway_route_table_id: 'TRANSIT_GATEWAY_ROUTE_TABLE_ID') do
  it { should exist }
end

Use should_not to test an entity does not exist.

describe aws_ec2_transit_gateway_route_table_propagations(transit_gateway_route_table_id: 'TRANSIT_GATEWAY_ROUTE_TABLE_ID') do
  it { should_not exist }
end

be_available

Use should to check if an entity is available.

describe aws_ec2_transit_gateway_route_table_propagations(transit_gateway_route_table_id: 'TRANSIT_GATEWAY_ROUTE_TABLE_ID') do
  it { should be_available }
end

AWS Permissions

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

Edit this page on GitHub

Thank you for your feedback!

×