Skip to content

Data Source: awsEc2TransitGatewayRouteTables

Provides information for multiple EC2 Transit Gateway Route Tables, such as their identifiers.

Example Usage

The following shows outputting all Transit Gateway Route Table Ids.

import * as cdktf from "cdktf";
/*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 cdktf.TerraformOutput(this, "example", {
  value: "${data.aws_ec2_transit_gateway_route_table.example.ids}",
});
const dataAwsEc2TransitGatewayRouteTablesExample =
  new aws.dataAwsEc2TransitGatewayRouteTables.DataAwsEc2TransitGatewayRouteTables(
    this,
    "example_1",
    {}
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAwsEc2TransitGatewayRouteTablesExample.overrideLogicalId("example");

Argument Reference

The following arguments are supported:

  • filter - (Optional) Custom filter block as described below.

  • tags - (Optional) Mapping of tags, each pair of which must exactly match a pair on the desired transit gateway route table.

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. A Transit Gateway Route Table will be selected if any one of the given values matches.

Attributes Reference

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

  • id - AWS Region.
  • ids - Set of Transit Gateway Route Table identifiers.

Timeouts

Configuration options:

  • read - (Default 20M)