Skip to content

Data Source: awsEc2TransitGateway

Get information on an EC2 Transit Gateway.

Example Usage

By Filter

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsEc2TransitGateway.DataAwsEc2TransitGateway(this, "example", {
  filter: [
    {
      name: "options.amazon-side-asn",
      values: ["64512"],
    },
  ],
});

By Identifier

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsEc2TransitGateway.DataAwsEc2TransitGateway(this, "example", {
  id: "tgw-12345678",
});

Argument Reference

The following arguments are supported:

  • filter - (Optional) One or more configuration blocks containing name-values filters. Detailed below.
  • id - (Optional) Identifier of the EC2 Transit Gateway.

filter Argument Reference

  • name - (Required) Name of the field to filter by, as defined by the underlying AWS API.
  • values - (Required) List of one or more values for the filter.

Attribute Reference

In addition to all arguments above, the following attributes are exported:

  • amazonSideAsn - Private Autonomous System Number (ASN) for the Amazon side of a BGP session
  • arn - EC2 Transit Gateway ARN
  • associationDefaultRouteTableId - Identifier of the default association route table
  • autoAcceptSharedAttachments - Whether resource attachment requests are automatically accepted
  • defaultRouteTableAssociation - Whether resource attachments are automatically associated with the default association route table
  • defaultRouteTablePropagation - Whether resource attachments automatically propagate routes to the default propagation route table
  • description - Description of the EC2 Transit Gateway
  • dnsSupport - Whether DNS support is enabled
  • multicastSupport - Whether Multicast support is enabled
  • id - EC2 Transit Gateway identifier
  • ownerId - Identifier of the AWS account that owns the EC2 Transit Gateway
  • propagationDefaultRouteTableId - Identifier of the default propagation route table
  • tags - Key-value tags for the EC2 Transit Gateway
  • transitGatewayCidrBlocks - The list of associated CIDR blocks
  • vpnEcmpSupport - Whether VPN Equal Cost Multipath Protocol support is enabled

Timeouts

Configuration options:

  • read - (Default 20M)