transit_gateways
Creates, updates, deletes or gets a transit_gateway
resource or lists transit_gateways
in a region
Overview
Name | transit_gateways |
Type | Resource |
Description | Resource Type definition for AWS::EC2::TransitGateway |
Id | aws.ec2.transit_gateways |
Fields
Name | Datatype | Description |
---|---|---|
description | string | |
association_default_route_table_id | string | |
auto_accept_shared_attachments | string | |
transit_gateway_arn | string | |
default_route_table_propagation | string | |
transit_gateway_cidr_blocks | array | |
propagation_default_route_table_id | string | |
default_route_table_association | string | |
id | string | |
vpn_ecmp_support | string | |
dns_support | string | |
multicast_support | string | |
amazon_side_asn | integer | |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ 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 }}';
/*+ 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 }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: transit_gateway
props:
- name: Description
value: '{{ Description }}'
- name: AssociationDefaultRouteTableId
value: '{{ AssociationDefaultRouteTableId }}'
- name: AutoAcceptSharedAttachments
value: '{{ AutoAcceptSharedAttachments }}'
- name: DefaultRouteTablePropagation
value: '{{ DefaultRouteTablePropagation }}'
- name: TransitGatewayCidrBlocks
value:
- '{{ TransitGatewayCidrBlocks[0] }}'
- name: PropagationDefaultRouteTableId
value: '{{ PropagationDefaultRouteTableId }}'
- name: DefaultRouteTableAssociation
value: '{{ DefaultRouteTableAssociation }}'
- name: VpnEcmpSupport
value: '{{ VpnEcmpSupport }}'
- name: DnsSupport
value: '{{ DnsSupport }}'
- name: MulticastSupport
value: '{{ MulticastSupport }}'
- name: AmazonSideAsn
value: '{{ AmazonSideAsn }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
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