Skip to main content

transit_gateways

Creates, updates, deletes or gets a transit_gateway resource or lists transit_gateways in a region

Overview

Nametransit_gateways
TypeResource
DescriptionResource Type definition for AWS::EC2::TransitGateway
Idaws.ec2.transit_gateways

Fields

NameDatatypeDescription
descriptionstring
association_default_route_table_idstring
auto_accept_shared_attachmentsstring
transit_gateway_arnstring
default_route_table_propagationstring
transit_gateway_cidr_blocksarray
propagation_default_route_table_idstring
default_route_table_associationstring
idstring
vpn_ecmp_supportstring
dns_supportstring
multicast_supportstring
amazon_side_asninteger
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all transit_gateways in a region.

SELECT
region,
description,
association_default_route_table_id,
auto_accept_shared_attachments,
transit_gateway_arn,
default_route_table_propagation,
transit_gateway_cidr_blocks,
propagation_default_route_table_id,
default_route_table_association,
id,
vpn_ecmp_support,
dns_support,
multicast_support,
amazon_side_asn,
tags
FROM aws.ec2.transit_gateways
WHERE region = 'us-east-1';

Gets all properties from an individual transit_gateway.

SELECT
region,
description,
association_default_route_table_id,
auto_accept_shared_attachments,
transit_gateway_arn,
default_route_table_propagation,
transit_gateway_cidr_blocks,
propagation_default_route_table_id,
default_route_table_association,
id,
vpn_ecmp_support,
dns_support,
multicast_support,
amazon_side_asn,
tags
FROM aws.ec2.transit_gateways
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

Use the following StackQL query and manifest file to create a new transit_gateway resource, using stack-deploy.

/*+ create */
INSERT INTO aws.ec2.transit_gateways (
Description,
AssociationDefaultRouteTableId,
AutoAcceptSharedAttachments,
DefaultRouteTablePropagation,
TransitGatewayCidrBlocks,
PropagationDefaultRouteTableId,
DefaultRouteTableAssociation,
VpnEcmpSupport,
DnsSupport,
MulticastSupport,
AmazonSideAsn,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ AssociationDefaultRouteTableId }}',
'{{ AutoAcceptSharedAttachments }}',
'{{ DefaultRouteTablePropagation }}',
'{{ TransitGatewayCidrBlocks }}',
'{{ PropagationDefaultRouteTableId }}',
'{{ DefaultRouteTableAssociation }}',
'{{ VpnEcmpSupport }}',
'{{ DnsSupport }}',
'{{ MulticastSupport }}',
'{{ AmazonSideAsn }}',
'{{ Tags }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.ec2.transit_gateways
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

To operate on the transit_gateways resource, the following permissions are required:

Read

ec2:CreateTransitGateway,
ec2:CreateTags,
ec2:DescribeTransitGateways,
ec2:DescribeTags,
ec2:DeleteTransitGateway,
ec2:DeleteTags,
ec2:ModifyTransitGateway,
ec2:ModifyTransitGatewayOptions

Create

ec2:CreateTransitGateway,
ec2:CreateTags,
ec2:DescribeTransitGateways,
ec2:DescribeTags,
ec2:DeleteTransitGateway,
ec2:DeleteTags,
ec2:ModifyTransitGateway,
ec2:ModifyTransitGatewayOptions

Update

ec2:CreateTransitGateway,
ec2:CreateTags,
ec2:DescribeTransitGateways,
ec2:DescribeTags,
ec2:DeleteTransitGateway,
ec2:DeleteTags,
ec2:ModifyTransitGateway,
ec2:ModifyTransitGatewayOptions

List

ec2:CreateTransitGateway,
ec2:CreateTags,
ec2:DescribeTransitGateways,
ec2:DescribeTags,
ec2:DeleteTransitGateway,
ec2:DeleteTags,
ec2:ModifyTransitGateway,
ec2:ModifyTransitGatewayOptions

Delete

ec2:CreateTransitGateway,
ec2:CreateTags,
ec2:DescribeTransitGateways,
ec2:DescribeTags,
ec2:DeleteTransitGateway,
ec2:DeleteTags,
ec2:ModifyTransitGateway,
ec2:ModifyTransitGatewayOptions