aws.ec2.getLocalGatewayRouteTable
Explore with Pulumi AI
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("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)
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
	})
}
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 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}
Using getLocalGatewayRouteTable
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getLocalGatewayRouteTable(args: GetLocalGatewayRouteTableArgs, opts?: InvokeOptions): Promise<GetLocalGatewayRouteTableResult>
function getLocalGatewayRouteTableOutput(args: GetLocalGatewayRouteTableOutputArgs, opts?: InvokeOptions): Output<GetLocalGatewayRouteTableResult>def get_local_gateway_route_table(filters: Optional[Sequence[GetLocalGatewayRouteTableFilter]] = None,
                                  local_gateway_id: Optional[str] = None,
                                  local_gateway_route_table_id: Optional[str] = None,
                                  outpost_arn: Optional[str] = None,
                                  state: Optional[str] = None,
                                  tags: Optional[Mapping[str, str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetLocalGatewayRouteTableResult
def get_local_gateway_route_table_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetLocalGatewayRouteTableFilterArgs]]]] = None,
                                  local_gateway_id: Optional[pulumi.Input[str]] = None,
                                  local_gateway_route_table_id: Optional[pulumi.Input[str]] = None,
                                  outpost_arn: Optional[pulumi.Input[str]] = None,
                                  state: Optional[pulumi.Input[str]] = None,
                                  tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetLocalGatewayRouteTableResult]func GetLocalGatewayRouteTable(ctx *Context, args *GetLocalGatewayRouteTableArgs, opts ...InvokeOption) (*GetLocalGatewayRouteTableResult, error)
func GetLocalGatewayRouteTableOutput(ctx *Context, args *GetLocalGatewayRouteTableOutputArgs, opts ...InvokeOption) GetLocalGatewayRouteTableResultOutput> Note: This function is named GetLocalGatewayRouteTable in the Go SDK.
public static class GetLocalGatewayRouteTable 
{
    public static Task<GetLocalGatewayRouteTableResult> InvokeAsync(GetLocalGatewayRouteTableArgs args, InvokeOptions? opts = null)
    public static Output<GetLocalGatewayRouteTableResult> Invoke(GetLocalGatewayRouteTableInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetLocalGatewayRouteTableResult> getLocalGatewayRouteTable(GetLocalGatewayRouteTableArgs args, InvokeOptions options)
public static Output<GetLocalGatewayRouteTableResult> getLocalGatewayRouteTable(GetLocalGatewayRouteTableArgs args, InvokeOptions options)
fn::invoke:
  function: aws:ec2/getLocalGatewayRouteTable:getLocalGatewayRouteTable
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Filters
List<GetLocal Gateway Route Table Filter> 
- LocalGateway stringId 
- ID of the specific local gateway route table to retrieve.
- LocalGateway stringRoute Table Id 
- Local Gateway Route Table Id assigned to desired local gateway route table
- OutpostArn string
- ARN of the Outpost the local gateway route table is associated with.
- State string
- State of the local gateway route table.
- Dictionary<string, string>
- Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
- Filters
[]GetLocal Gateway Route Table Filter 
- LocalGateway stringId 
- ID of the specific local gateway route table to retrieve.
- LocalGateway stringRoute Table Id 
- Local Gateway Route Table Id assigned to desired local gateway route table
- OutpostArn string
- ARN of the Outpost the local gateway route table is associated with.
- State string
- State of the local gateway route table.
- map[string]string
- Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
- filters
List<GetLocal Gateway Route Table Filter> 
- localGateway StringId 
- ID of the specific local gateway route table to retrieve.
- localGateway StringRoute Table Id 
- Local Gateway Route Table Id assigned to desired local gateway route table
- outpostArn String
- ARN of the Outpost the local gateway route table is associated with.
- state String
- State of the local gateway route table.
- Map<String,String>
- Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
- filters
GetLocal Gateway Route Table Filter[] 
- localGateway stringId 
- ID of the specific local gateway route table to retrieve.
- localGateway stringRoute Table Id 
- Local Gateway Route Table Id assigned to desired local gateway route table
- outpostArn string
- ARN of the Outpost the local gateway route table is associated with.
- state string
- State of the local gateway route table.
- {[key: string]: string}
- Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
- filters
Sequence[GetLocal Gateway Route Table Filter] 
- local_gateway_ strid 
- ID of the specific local gateway route table to retrieve.
- local_gateway_ strroute_ table_ id 
- Local Gateway Route Table Id assigned to desired local gateway route table
- outpost_arn str
- ARN of the Outpost the local gateway route table is associated with.
- state str
- State of the local gateway route table.
- Mapping[str, str]
- Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
- filters List<Property Map>
- localGateway StringId 
- ID of the specific local gateway route table to retrieve.
- localGateway StringRoute Table Id 
- Local Gateway Route Table Id assigned to desired local gateway route table
- outpostArn String
- ARN of the Outpost the local gateway route table is associated with.
- state String
- State of the local gateway route table.
- Map<String>
- Mapping of tags, each pair of which must exactly match a pair on the desired local gateway route table. - More complex filters can be expressed using one or more - filtersub-blocks, which take the following arguments:
getLocalGatewayRouteTable Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- LocalGateway stringId 
- LocalGateway stringRoute Table Id 
- OutpostArn string
- State string
- Dictionary<string, string>
- Filters
List<GetLocal Gateway Route Table Filter> 
- Id string
- The provider-assigned unique ID for this managed resource.
- LocalGateway stringId 
- LocalGateway stringRoute Table Id 
- OutpostArn string
- State string
- map[string]string
- Filters
[]GetLocal Gateway Route Table Filter 
- id String
- The provider-assigned unique ID for this managed resource.
- localGateway StringId 
- localGateway StringRoute Table Id 
- outpostArn String
- state String
- Map<String,String>
- filters
List<GetLocal Gateway Route Table Filter> 
- id string
- The provider-assigned unique ID for this managed resource.
- localGateway stringId 
- localGateway stringRoute Table Id 
- outpostArn string
- state string
- {[key: string]: string}
- filters
GetLocal Gateway Route Table Filter[] 
- id str
- The provider-assigned unique ID for this managed resource.
- local_gateway_ strid 
- local_gateway_ strroute_ table_ id 
- outpost_arn str
- state str
- Mapping[str, str]
- filters
Sequence[GetLocal Gateway Route Table Filter] 
- id String
- The provider-assigned unique ID for this managed resource.
- localGateway StringId 
- localGateway StringRoute Table Id 
- outpostArn String
- state String
- Map<String>
- filters List<Property Map>
Supporting Types
GetLocalGatewayRouteTableFilter     
- Name string
- Name of the field to filter by, as defined by the underlying AWS API.
- Values List<string>
- Set of values that are accepted for the given field. A local gateway route table will be selected if any one of the given values matches.
- Name string
- Name of the field to filter by, as defined by the underlying AWS API.
- Values []string
- Set of values that are accepted for the given field. A local gateway route table will be selected if any one of the given values matches.
- name String
- Name of the field to filter by, as defined by the underlying AWS API.
- values List<String>
- Set of values that are accepted for the given field. A local gateway route table will be selected if any one of the given values matches.
- name string
- Name of the field to filter by, as defined by the underlying AWS API.
- values string[]
- Set of values that are accepted for the given field. A local gateway route table will be selected if any one of the given values matches.
- name str
- Name of the field to filter by, as defined by the underlying AWS API.
- values Sequence[str]
- Set of values that are accepted for the given field. A local gateway route table will be selected if any one of the given values matches.
- name String
- Name of the field to filter by, as defined by the underlying AWS API.
- values List<String>
- Set of values that are accepted for the given field. A local gateway route table will be selected if any one of the given values matches.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.