Manages an EC2 Transit Gateway Connect.
resource "aws_ec2_transit_gateway_vpc_attachment" "example" {
subnet_ids = [aws_subnet.example.id]
transit_gateway_id = aws_ec2_transit_gateway.example.id
vpc_id = aws_vpc.example.id
}
resource "aws_ec2_transit_gateway_connect" "attachment" {
transport_attachment_id = aws_ec2_transit_gateway_vpc_attachment.example.id
transit_gateway_id = aws_ec2_transit_gateway.example.id
}
This resource supports the following arguments:
protocol
- (Optional) The tunnel protocol. Valid values: gre
. Default is gre
.tags
- (Optional) Key-value tags for the EC2 Transit Gateway Connect. If configured with a provider default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.transit_gateway_default_route_table_association
- (Optional) Boolean whether the Connect should be associated with the EC2 Transit Gateway association default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: true
.transit_gateway_default_route_table_propagation
- (Optional) Boolean whether the Connect should propagate routes with the EC2 Transit Gateway propagation default route table. This cannot be configured or perform drift detection with Resource Access Manager shared EC2 Transit Gateways. Default value: true
.transit_gateway_id
- (Required) Identifier of EC2 Transit Gateway.transport_attachment_id
- (Required) The underlaying VPC attachmentThis resource exports the following attributes in addition to the arguments above:
id
- EC2 Transit Gateway Attachment identifiertags_all
- A map of tags assigned to the resource, including those inherited from the provider default_tags
configuration block.create
- (Default 10m
)update
- (Default 10m
)delete
- (Default 10m
)In Terraform v1.5.0 and later, use an import
block to import aws_ec2_transit_gateway_connect
using the EC2 Transit Gateway Connect identifier. For example:
import {
to = aws_ec2_transit_gateway_connect.example
id = "tgw-attach-12345678"
}
Using terraform import
, import aws_ec2_transit_gateway_connect
using the EC2 Transit Gateway Connect identifier. For example:
% terraform import aws_ec2_transit_gateway_connect.example tgw-attach-12345678