title | platform |
---|---|
About the aws_ec2_transit_gateway_route_table_propagations Resource |
aws |
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.
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
transit_gateway_route_table_id
(required)
The ID of the Transit Gateway route table.
For additional information, see the AWS documentation on AWS EC2 TransitGatewayRouteTablePropagation.
Property | Description | Fields |
---|---|---|
transit_gateway_attachment_ids | A list of the attachment IDs. | transit_gateway_attachment_id |
resource_ids | A list of the resource IDs. | resource_id |
resource_types | A list of the resource types. | resource_type |
states | A list of the resource states. | state |
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
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
This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our Universal Matchers page.
The controls will pass if the get
method returns at least one result.
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
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
Your Principal will need the EC2:Client:GetTransitGatewayRouteTablePropagationsResult
action with Effect
set to Allow
.