Skip to content

Data Source: awsEc2TransitGatewayPeeringAttachment

Get information on an EC2 Transit Gateway Peering Attachment.

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.dataAwsEc2TransitGatewayPeeringAttachment.DataAwsEc2TransitGatewayPeeringAttachment(
  this,
  "example",
  {
    filter: [
      {
        name: "transit-gateway-attachment-id",
        values: ["tgw-attach-12345678"],
      },
    ],
  }
);

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.dataAwsEc2TransitGatewayPeeringAttachment.DataAwsEc2TransitGatewayPeeringAttachment(
  this,
  "attachment",
  {
    id: "tgw-attach-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 Peering Attachment.
  • tags - (Optional) Mapping of tags, each pair of which must exactly match a pair on the specific EC2 Transit Gateway Peering Attachment to retrieve.

More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

  • name - (Required) Name of the field to filter by, as defined by the underlying AWS API.
  • values - (Required) Set of values that are accepted for the given field. An EC2 Transit Gateway Peering Attachment be selected if any one of the given values matches.

Attribute Reference

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

  • peerAccountId - Identifier of the peer AWS account
  • peerRegion - Identifier of the peer AWS region
  • peerTransitGatewayId - Identifier of the peer EC2 Transit Gateway
  • transitGatewayId - Identifier of the local EC2 Transit Gateway

Timeouts

Configuration options:

  • read - (Default 20M)