get Local Gateway
Provides details about an EC2 Local Gateway.
Example Usage
The following example shows how one might accept a local gateway id as a variable.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const localGatewayId = config.requireObject<any>("localGatewayId");
const selected = aws.ec2.getLocalGateway({
id: localGatewayId,
});
import pulumi
import pulumi_aws as aws
config = pulumi.Config()
local_gateway_id = config.require_object("localGatewayId")
selected = aws.ec2.get_local_gateway(id=local_gateway_id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var localGatewayId = config.RequireObject<dynamic>("localGatewayId");
var selected = Aws.Ec2.GetLocalGateway.Invoke(new()
{
Id = localGatewayId,
});
});
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, "")
localGatewayId := cfg.RequireObject("localGatewayId")
_, err := ec2.GetLocalGateway(ctx, &ec2.GetLocalGatewayArgs{
Id: pulumi.StringRef(localGatewayId),
}, 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.GetLocalGatewayArgs;
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 localGatewayId = config.get("localGatewayId");
final var selected = Ec2Functions.getLocalGateway(GetLocalGatewayArgs.builder()
.id(localGatewayId)
.build());
}
}
configuration:
localGatewayId:
type: dynamic
variables:
selected:
fn::invoke:
function: aws:ec2:getLocalGateway
arguments:
id: ${localGatewayId}
Return
A collection of values returned by getLocalGateway.
Parameters
A collection of arguments for invoking getLocalGateway.
Return
A collection of values returned by getLocalGateway.
Parameters
Custom filter block as described below.
Id of the specific Local Gateway to retrieve.
Current state of the desired Local Gateway. Can be either "pending"
or "available"
.
Mapping of tags, each pair of which must exactly match a pair on the desired Local Gateway. The arguments of this data source act as filters for querying the available Local Gateways in the current region. The given filters must match exactly one Local Gateway whose data will be exported as attributes.
See also
Return
A collection of values returned by getLocalGateway.
Parameters
Builder for com.pulumi.aws.ec2.kotlin.inputs.GetLocalGatewayPlainArgs.