GetRouteTable

Get information on an EC2 Transit Gateway Route Table.

Example Usage

By Filter

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2TransitGateway.GetRouteTable.InvokeAsync(new Aws.Ec2TransitGateway.GetRouteTableArgs
        {
            Filters = 
            {
                new Aws.Ec2TransitGateway.Inputs.GetRouteTableFilterArgs
                {
                    Name = "default-association-route-table",
                    Values = 
                    {
                        "true",
                    },
                },
                new Aws.Ec2TransitGateway.Inputs.GetRouteTableFilterArgs
                {
                    Name = "transit-gateway-id",
                    Values = 
                    {
                        "tgw-12345678",
                    },
                },
            },
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ec2transitgateway.LookupRouteTable(ctx, &ec2transitgateway.LookupRouteTableArgs{
            Filters: []ec2transitgateway.GetRouteTableFilter{
                ec2transitgateway.GetRouteTableFilter{
                    Name: "default-association-route-table",
                    Values: []string{
                        "true",
                    },
                },
                ec2transitgateway.GetRouteTableFilter{
                    Name: "transit-gateway-id",
                    Values: []string{
                        "tgw-12345678",
                    },
                },
            },
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ec2transitgateway.get_route_table(filters=[
    {
        "name": "default-association-route-table",
        "values": ["true"],
    },
    {
        "name": "transit-gateway-id",
        "values": ["tgw-12345678"],
    },
])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2transitgateway.getRouteTable({
    filters: [
        {
            name: "default-association-route-table",
            values: ["true"],
        },
        {
            name: "transit-gateway-id",
            values: ["tgw-12345678"],
        },
    ],
}, { async: true }));

By Identifier

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ec2TransitGateway.GetRouteTable.InvokeAsync(new Aws.Ec2TransitGateway.GetRouteTableArgs
        {
            Id = "tgw-rtb-12345678",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2transitgateway"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        opt0 := "tgw-rtb-12345678"
        _, err := ec2transitgateway.LookupRouteTable(ctx, &ec2transitgateway.LookupRouteTableArgs{
            Id: &opt0,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ec2transitgateway.get_route_table(id="tgw-rtb-12345678")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ec2transitgateway.getRouteTable({
    id: "tgw-rtb-12345678",
}, { async: true }));

Using GetRouteTable

function getRouteTable(args: GetRouteTableArgs, opts?: InvokeOptions): Promise<GetRouteTableResult>
function  get_route_table(filters=None, id=None, tags=None, opts=None)
func LookupRouteTable(ctx *Context, args *LookupRouteTableArgs, opts ...InvokeOption) (*LookupRouteTableResult, error)

Note: This function is named LookupRouteTable in the Go SDK.

public static class GetRouteTable {
    public static Task<GetRouteTableResult> InvokeAsync(GetRouteTableArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Filters List<GetRouteTableFilterArgs>

One or more configuration blocks containing name-values filters. Detailed below.

Id string

Identifier of the EC2 Transit Gateway Route Table.

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway Route Table

Filters []GetRouteTableFilter

One or more configuration blocks containing name-values filters. Detailed below.

Id string

Identifier of the EC2 Transit Gateway Route Table.

Tags map[string]string

Key-value tags for the EC2 Transit Gateway Route Table

filters GetRouteTableFilter[]

One or more configuration blocks containing name-values filters. Detailed below.

id string

Identifier of the EC2 Transit Gateway Route Table.

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway Route Table

filters List[GetRouteTableFilter]

One or more configuration blocks containing name-values filters. Detailed below.

id str

Identifier of the EC2 Transit Gateway Route Table.

tags Dict[str, str]

Key-value tags for the EC2 Transit Gateway Route Table

GetRouteTable Result

The following output properties are available:

DefaultAssociationRouteTable bool

Boolean whether this is the default association route table for the EC2 Transit Gateway

DefaultPropagationRouteTable bool

Boolean whether this is the default propagation route table for the EC2 Transit Gateway

Tags Dictionary<string, string>

Key-value tags for the EC2 Transit Gateway Route Table

TransitGatewayId string

EC2 Transit Gateway identifier

Filters List<GetRouteTableFilter>
Id string

EC2 Transit Gateway Route Table identifier

DefaultAssociationRouteTable bool

Boolean whether this is the default association route table for the EC2 Transit Gateway

DefaultPropagationRouteTable bool

Boolean whether this is the default propagation route table for the EC2 Transit Gateway

Tags map[string]string

Key-value tags for the EC2 Transit Gateway Route Table

TransitGatewayId string

EC2 Transit Gateway identifier

Filters []GetRouteTableFilter
Id string

EC2 Transit Gateway Route Table identifier

defaultAssociationRouteTable boolean

Boolean whether this is the default association route table for the EC2 Transit Gateway

defaultPropagationRouteTable boolean

Boolean whether this is the default propagation route table for the EC2 Transit Gateway

tags {[key: string]: string}

Key-value tags for the EC2 Transit Gateway Route Table

transitGatewayId string

EC2 Transit Gateway identifier

filters GetRouteTableFilter[]
id string

EC2 Transit Gateway Route Table identifier

default_association_route_table bool

Boolean whether this is the default association route table for the EC2 Transit Gateway

default_propagation_route_table bool

Boolean whether this is the default propagation route table for the EC2 Transit Gateway

tags Dict[str, str]

Key-value tags for the EC2 Transit Gateway Route Table

transit_gateway_id str

EC2 Transit Gateway identifier

filters List[GetRouteTableFilter]
id str

EC2 Transit Gateway Route Table identifier

Supporting Types

GetRouteTableFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

Name of the filter.

Values List<string>

List of one or more values for the filter.

Name string

Name of the filter.

Values []string

List of one or more values for the filter.

name string

Name of the filter.

values string[]

List of one or more values for the filter.

name str

Name of the filter.

values List[str]

List of one or more values for the filter.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.