transit_gateway_attachments
Creates, updates, deletes or gets a transit_gateway_attachment resource or lists transit_gateway_attachments in a region
Overview
| Name | transit_gateway_attachments |
| Type | Resource |
| Description | Resource Type definition for AWS::EC2::TransitGatewayAttachment |
| Id | awscc.ec2.transit_gateway_attachments |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
options | object | The options for the transit gateway vpc attachment. |
transit_gateway_id | string | |
vpc_id | string | |
id | string | |
subnet_ids | array | |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | |
region | string | AWS region. |
For more information, see AWS::EC2::TransitGatewayAttachment.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | transit_gateway_attachments | INSERT | VpcId, SubnetIds, TransitGatewayId, region |
delete_resource | transit_gateway_attachments | DELETE | Identifier, region |
update_resource | transit_gateway_attachments | UPDATE | Identifier, PatchDocument, region |
list_resources | transit_gateway_attachments_list_only | SELECT | region |
get_resource | transit_gateway_attachments | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual transit_gateway_attachment.
SELECT
region,
options,
transit_gateway_id,
vpc_id,
id,
subnet_ids,
tags
FROM awscc.ec2.transit_gateway_attachments
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all transit_gateway_attachments in a region.
SELECT
region,
id
FROM awscc.ec2.transit_gateway_attachments_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new transit_gateway_attachment resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.ec2.transit_gateway_attachments (
TransitGatewayId,
VpcId,
SubnetIds,
region
)
SELECT
'{{ transit_gateway_id }}',
'{{ vpc_id }}',
'{{ subnet_ids }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.ec2.transit_gateway_attachments (
Options,
TransitGatewayId,
VpcId,
SubnetIds,
Tags,
region
)
SELECT
'{{ options }}',
'{{ transit_gateway_id }}',
'{{ vpc_id }}',
'{{ subnet_ids }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: transit_gateway_attachment
props:
- name: options
value:
ipv6_support: '{{ ipv6_support }}'
appliance_mode_support: '{{ appliance_mode_support }}'
security_group_referencing_support: '{{ security_group_referencing_support }}'
dns_support: '{{ dns_support }}'
- name: transit_gateway_id
value: '{{ transit_gateway_id }}'
- name: vpc_id
value: '{{ vpc_id }}'
- name: subnet_ids
value:
- '{{ subnet_ids[0] }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a transit_gateway_attachment resource, using stack-deploy.
/*+ update */
UPDATE awscc.ec2.transit_gateway_attachments
SET PatchDocument = string('{{ {
"Options": options,
"SubnetIds": subnet_ids,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.ec2.transit_gateway_attachments
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the transit_gateway_attachments resource, the following permissions are required:
- Read
- Create
- Update
- List
- Delete
ec2:DescribeTransitGatewayVpcAttachments,
ec2:DescribeTags
ec2:DescribeTransitGatewayVpcAttachments,
ec2:CreateTransitGatewayVpcAttachment,
ec2:CreateTags,
ec2:DescribeTags
ec2:DescribeTransitGatewayVpcAttachments,
ec2:DescribeTags,
ec2:CreateTransitGatewayVpcAttachment,
ec2:CreateTags,
ec2:DeleteTransitGatewayVpcAttachment,
ec2:DeleteTags,
ec2:ModifyTransitGatewayVpcAttachment
ec2:DescribeTransitGatewayVpcAttachments,
ec2:DescribeTags
ec2:DescribeTransitGatewayVpcAttachments,
ec2:DeleteTransitGatewayVpcAttachment,
ec2:DeleteTags,
ec2:DescribeTags