Resource: aws_ec2_transit_gateway#
Manages a transit gateway. For details about transit gateways, see the user documentation.
Example Usage#
resource "aws_ec2_transit_gateway" "example" {
description = "tf example"
tags = {
Name = "tf-tgw"
}
}
Argument Reference#
The following arguments are supported:
default_route_table_association- (Optional) Indicates whether the association with default association route table is created automatically.- Valid values:
disable,enable - Default value:
enable
- Valid values:
default_route_table_propagation- (Optional) Indicates whether the routes are automatically propagated to the default propagation route table.- Valid values:
disable,enable - Default value:
enable
- Valid values:
description- (Optional) The description of the transit gateway.shared_owners- (Optional) List of project IDs (project@customer) that are granted access to the transit gateway.tags- (Optional) Map of tags to assign to the transit gateway. If a providerdefault_tagsconfiguration block is used, tags with matching keys will overwrite those defined at the provider level.
Attribute Reference#
Supported attributes#
In addition to all arguments above, the following attributes are exported:
association_default_route_table_id- The ID of the default association route table.id- The ID of the transit gateway.owner_id- The ID of the project that owns the transit gateway.propagation_default_route_table_id- The ID of the default propagation route table.tags_all- Map of tags assigned to the transit gateway, including those inherited from the providerdefault_tagsconfiguration block.
Unsupported attributes#
~> Note These attributes may be present in the terraform.tfstate file, but they have preset values and cannot be specified in configuration files.
The following attributes are not currently supported:
amazon_side_asn, arn, auto_accept_shared_attachments, dns_support, multicast_support, transit_gateway_cidr_blocks, vpn_ecmp_support.
Timeouts#
The timeouts block allows you to specify timeouts for certain actions:
create- (Default10 minutes) How long to wait for the transit gateway to be created.update- (Default10 minutes) How long to wait for the transit gateway to be updated.delete- (Default10 minutes) How long to wait for the transit gateway to be deleted.
Import#
The transit gateway can be imported using id, e.g.,
$ terraform import aws_ec2_transit_gateway.example tgw-12345678