title | platform |
---|---|
About the aws_transit_gateway_connects Resource |
aws |
Use the aws_transit_gateway_connects
InSpec audit resource to test properties of multiple AWS EC2 Transit Gateway Connect.
The AWS::EC2::TransitGatewayConnect
resource creates a Connect attachment from a specified transit gateway attachment.
Ensure that Transit Gateway Connect exists.
describe aws_transit_gateway_connects do
it { should exist }
end
This resource does not require any parameters.
For additional information, see the AWS documentation on AWS EC2 TransitGatewayConnect.
Property | Description |
---|---|
transit_gateway_attachment_ids | The ID of the Connect attachment. |
transport_transit_gateway_attachment_ids | The ID of the attachment from which the Connect attachment was created. |
transit_gateway_ids | The ID of the transit gateway. |
states | The state of the attachment. |
creation_times | The creation time. |
options | The Connect attachment options. The tunnel protocol. |
tags | The tags for the attachment. |
describe aws_transit_gateway_connects do
its('transit_gateway_attachment_ids') { should include 'TRANSIT_GATEWAY_ATTACHMENT_ID' }
end
describe aws_transit_gateway_connects do
its('states') { should include 'available' }
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 describe
method returns at least one result.
Use should
to test that the entity exists.
describe aws_transit_gateway_connects do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_transit_gateway_connects do
it { should_not exist }
end
Use should
to check if the entity is available.
describe aws_transit_gateway_connects do
it { should be_available }
end
Your Principal will need the EC2:Client:DescribeTransitGatewayConnectsResult
action with Effect
set to Allow
.