getLocalGatewayRouteTable

Provides details about an EC2 Local Gateway Route Table. This data source can prove useful when a module accepts a local gateway route table id as an input variable and needs to, for example, find the associated Outpost or Local Gateway.

Example Usage

The following example returns a specific local gateway route table ID

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const awsEc2LocalGatewayRouteTable = config.requireObject<any>("awsEc2LocalGatewayRouteTable");
const selected = aws.ec2.getLocalGatewayRouteTable({
localGatewayRouteTableId: awsEc2LocalGatewayRouteTable,
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
aws_ec2_local_gateway_route_table = config.require_object("awsEc2LocalGatewayRouteTable")
selected = aws.ec2.get_local_gateway_route_table(local_gateway_route_table_id=aws_ec2_local_gateway_route_table)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var awsEc2LocalGatewayRouteTable = config.RequireObject<dynamic>("awsEc2LocalGatewayRouteTable");
var selected = Aws.Ec2.GetLocalGatewayRouteTable.Invoke(new()
{
LocalGatewayRouteTableId = awsEc2LocalGatewayRouteTable,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
awsEc2LocalGatewayRouteTable := cfg.RequireObject("awsEc2LocalGatewayRouteTable")
_, err := ec2.GetLocalGatewayRouteTable(ctx, &ec2.GetLocalGatewayRouteTableArgs{
LocalGatewayRouteTableId: pulumi.StringRef(awsEc2LocalGatewayRouteTable),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Ec2Functions;
import com.pulumi.aws.ec2.inputs.GetLocalGatewayRouteTableArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var awsEc2LocalGatewayRouteTable = config.get("awsEc2LocalGatewayRouteTable");
final var selected = Ec2Functions.getLocalGatewayRouteTable(GetLocalGatewayRouteTableArgs.builder()
.localGatewayRouteTableId(awsEc2LocalGatewayRouteTable)
.build());
}
}
configuration:
awsEc2LocalGatewayRouteTable:
type: dynamic
variables:
selected:
fn::invoke:
function: aws:ec2:getLocalGatewayRouteTable
arguments:
localGatewayRouteTableId: ${awsEc2LocalGatewayRouteTable}

Return

A collection of values returned by getLocalGatewayRouteTable.

Parameters

argument

A collection of arguments for invoking getLocalGatewayRouteTable.


suspend fun getLocalGatewayRouteTable(filters: List<GetLocalGatewayRouteTableFilter>? = null, localGatewayId: String? = null, localGatewayRouteTableId: String? = null, outpostArn: String? = null, state: String? = null, tags: Map<String, String>? = null): GetLocalGatewayRouteTableResult

Return

A collection of values returned by getLocalGatewayRouteTable.

Parameters

filters
localGatewayId

ID of the specific local gateway route table to retrieve.

localGatewayRouteTableId

Local Gateway Route Table Id assigned to desired local gateway route table

outpostArn

ARN of the Outpost the local gateway route table is associated with.

state

State of the local gateway route table.

tags

Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table. The arguments of this data source act as filters for querying the available Local Gateway Route Tables in the current region. The given filters must match exactly one Local Gateway Route Table whose data will be exported as attributes.

See also


Return

A collection of values returned by getLocalGatewayRouteTable.

Parameters

argument

Builder for com.pulumi.aws.ec2.kotlin.inputs.GetLocalGatewayRouteTablePlainArgs.

See also