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 | awscc.ec2.transit_gateways |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
default_route_table_propagation | string | |
transit_gateway_arn | string | |
description | string | |
auto_accept_shared_attachments | string | |
default_route_table_association | string | |
id | string | |
vpn_ecmp_support | string | |
dns_support | string | |
security_group_referencing_support | string | |
multicast_support | string | |
amazon_side_asn | integer | |
transit_gateway_cidr_blocks | array | |
tags | array | |
association_default_route_table_id | string | |
propagation_default_route_table_id | string | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | |
region | string | AWS region. |
For more information, see AWS::EC2::TransitGateway.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | transit_gateways | INSERT | region |
delete_resource | transit_gateways | DELETE | Identifier, region |
update_resource | transit_gateways | UPDATE | Identifier, PatchDocument, region |
list_resources | transit_gateways_list_only | SELECT | region |
get_resource | transit_gateways | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual transit_gateway.
SELECT
region,
default_route_table_propagation,
transit_gateway_arn,
description,
auto_accept_shared_attachments,
default_route_table_association,
id,
vpn_ecmp_support,
dns_support,
security_group_referencing_support,
multicast_support,
amazon_side_asn,
transit_gateway_cidr_blocks,
tags,
association_default_route_table_id,
propagation_default_route_table_id
FROM awscc.ec2.transit_gateways
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all transit_gateways in a region.
SELECT
region,
id
FROM awscc.ec2.transit_gateways_list_only
WHERE
region = 'us-east-1';
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 awscc.ec2.transit_gateways (
DefaultRouteTablePropagation,
Description,
AutoAcceptSharedAttachments,
DefaultRouteTableAssociation,
VpnEcmpSupport,
DnsSupport,
SecurityGroupReferencingSupport,
MulticastSupport,
AmazonSideAsn,
TransitGatewayCidrBlocks,
Tags,
AssociationDefaultRouteTableId,
PropagationDefaultRouteTableId,
region
)
SELECT
'{{ default_route_table_propagation }}',
'{{ description }}',
'{{ auto_accept_shared_attachments }}',
'{{ default_route_table_association }}',
'{{ vpn_ecmp_support }}',
'{{ dns_support }}',
'{{ security_group_referencing_support }}',
'{{ multicast_support }}',
'{{ amazon_side_asn }}',
'{{ transit_gateway_cidr_blocks }}',
'{{ tags }}',
'{{ association_default_route_table_id }}',
'{{ propagation_default_route_table_id }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.ec2.transit_gateways (
DefaultRouteTablePropagation,
Description,
AutoAcceptSharedAttachments,
DefaultRouteTableAssociation,
VpnEcmpSupport,
DnsSupport,
SecurityGroupReferencingSupport,
MulticastSupport,
AmazonSideAsn,
TransitGatewayCidrBlocks,
Tags,
AssociationDefaultRouteTableId,
PropagationDefaultRouteTableId,
region
)
SELECT
'{{ default_route_table_propagation }}',
'{{ description }}',
'{{ auto_accept_shared_attachments }}',
'{{ default_route_table_association }}',
'{{ vpn_ecmp_support }}',
'{{ dns_support }}',
'{{ security_group_referencing_support }}',
'{{ multicast_support }}',
'{{ amazon_side_asn }}',
'{{ transit_gateway_cidr_blocks }}',
'{{ tags }}',
'{{ association_default_route_table_id }}',
'{{ propagation_default_route_table_id }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: transit_gateway
props:
- name: default_route_table_propagation
value: '{{ default_route_table_propagation }}'
- name: description
value: '{{ description }}'
- name: auto_accept_shared_attachments
value: '{{ auto_accept_shared_attachments }}'
- name: default_route_table_association
value: '{{ default_route_table_association }}'
- name: vpn_ecmp_support
value: '{{ vpn_ecmp_support }}'
- name: dns_support
value: '{{ dns_support }}'
- name: security_group_referencing_support
value: '{{ security_group_referencing_support }}'
- name: multicast_support
value: '{{ multicast_support }}'
- name: amazon_side_asn
value: '{{ amazon_side_asn }}'
- name: transit_gateway_cidr_blocks
value:
- '{{ transit_gateway_cidr_blocks[0] }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
- name: association_default_route_table_id
value: '{{ association_default_route_table_id }}'
- name: propagation_default_route_table_id
value: '{{ propagation_default_route_table_id }}'
UPDATE example
Use the following StackQL query and manifest file to update a transit_gateway resource, using stack-deploy.
/*+ update */
UPDATE awscc.ec2.transit_gateways
SET PatchDocument = string('{{ {
"DefaultRouteTablePropagation": default_route_table_propagation,
"Description": description,
"AutoAcceptSharedAttachments": auto_accept_shared_attachments,
"DefaultRouteTableAssociation": default_route_table_association,
"VpnEcmpSupport": vpn_ecmp_support,
"DnsSupport": dns_support,
"SecurityGroupReferencingSupport": security_group_referencing_support,
"TransitGatewayCidrBlocks": transit_gateway_cidr_blocks,
"Tags": tags,
"AssociationDefaultRouteTableId": association_default_route_table_id,
"PropagationDefaultRouteTableId": propagation_default_route_table_id
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.ec2.transit_gateways
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the transit_gateways resource, the following permissions are required:
- Create
- Read
- Delete
- Update
- List
ec2:CreateTransitGateway,
ec2:CreateTags,
ec2:DescribeTransitGateways,
ec2:DescribeTags
ec2:DescribeTransitGateways,
ec2:DescribeTags
ec2:DescribeTransitGateways,
ec2:DescribeTags,
ec2:DeleteTransitGateway,
ec2:DeleteTags
ec2:CreateTransitGateway,
ec2:CreateTags,
ec2:DescribeTransitGateways,
ec2:DescribeTags,
ec2:DeleteTransitGateway,
ec2:DeleteTags,
ec2:ModifyTransitGateway,
ec2:ModifyTransitGatewayOptions
ec2:DescribeTransitGateways,
ec2:DescribeTags