LocalGatewayRoute

Manages an EC2 Local Gateway Route. More information can be found in the Outposts User Guide.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Ec2.LocalGatewayRoute("example", new Aws.Ec2.LocalGatewayRouteArgs
        {
            DestinationCidrBlock = "172.16.0.0/16",
            LocalGatewayRouteTableId = data.Aws_ec2_local_gateway_route_table.Example.Id,
            LocalGatewayVirtualInterfaceGroupId = data.Aws_ec2_local_gateway_virtual_interface_group.Example.Id,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ec2.NewLocalGatewayRoute(ctx, "example", &ec2.LocalGatewayRouteArgs{
			DestinationCidrBlock:                pulumi.String("172.16.0.0/16"),
			LocalGatewayRouteTableId:            pulumi.Any(data.Aws_ec2_local_gateway_route_table.Example.Id),
			LocalGatewayVirtualInterfaceGroupId: pulumi.Any(data.Aws_ec2_local_gateway_virtual_interface_group.Example.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

example = aws.ec2.LocalGatewayRoute("example",
    destination_cidr_block="172.16.0.0/16",
    local_gateway_route_table_id=data["aws_ec2_local_gateway_route_table"]["example"]["id"],
    local_gateway_virtual_interface_group_id=data["aws_ec2_local_gateway_virtual_interface_group"]["example"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ec2.LocalGatewayRoute("example", {
    destinationCidrBlock: "172.16.0.0/16",
    localGatewayRouteTableId: data.aws_ec2_local_gateway_route_table.example.id,
    localGatewayVirtualInterfaceGroupId: data.aws_ec2_local_gateway_virtual_interface_group.example.id,
});

Create a LocalGatewayRoute Resource

new LocalGatewayRoute(name: string, args: LocalGatewayRouteArgs, opts?: CustomResourceOptions);
@overload
def LocalGatewayRoute(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      destination_cidr_block: Optional[str] = None,
                      local_gateway_route_table_id: Optional[str] = None,
                      local_gateway_virtual_interface_group_id: Optional[str] = None)
@overload
def LocalGatewayRoute(resource_name: str,
                      args: LocalGatewayRouteArgs,
                      opts: Optional[ResourceOptions] = None)
func NewLocalGatewayRoute(ctx *Context, name string, args LocalGatewayRouteArgs, opts ...ResourceOption) (*LocalGatewayRoute, error)
public LocalGatewayRoute(string name, LocalGatewayRouteArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args LocalGatewayRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args LocalGatewayRouteArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args LocalGatewayRouteArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args LocalGatewayRouteArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

LocalGatewayRoute Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The LocalGatewayRoute resource accepts the following input properties:

DestinationCidrBlock string
IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
LocalGatewayRouteTableId string
Identifier of EC2 Local Gateway Route Table.
LocalGatewayVirtualInterfaceGroupId string
Identifier of EC2 Local Gateway Virtual Interface Group.
DestinationCidrBlock string
IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
LocalGatewayRouteTableId string
Identifier of EC2 Local Gateway Route Table.
LocalGatewayVirtualInterfaceGroupId string
Identifier of EC2 Local Gateway Virtual Interface Group.
destinationCidrBlock string
IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
localGatewayRouteTableId string
Identifier of EC2 Local Gateway Route Table.
localGatewayVirtualInterfaceGroupId string
Identifier of EC2 Local Gateway Virtual Interface Group.
destination_cidr_block str
IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
local_gateway_route_table_id str
Identifier of EC2 Local Gateway Route Table.
local_gateway_virtual_interface_group_id str
Identifier of EC2 Local Gateway Virtual Interface Group.

Outputs

All input properties are implicitly available as output properties. Additionally, the LocalGatewayRoute resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing LocalGatewayRoute Resource

Get an existing LocalGatewayRoute resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: LocalGatewayRouteState, opts?: CustomResourceOptions): LocalGatewayRoute
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        destination_cidr_block: Optional[str] = None,
        local_gateway_route_table_id: Optional[str] = None,
        local_gateway_virtual_interface_group_id: Optional[str] = None) -> LocalGatewayRoute
func GetLocalGatewayRoute(ctx *Context, name string, id IDInput, state *LocalGatewayRouteState, opts ...ResourceOption) (*LocalGatewayRoute, error)
public static LocalGatewayRoute Get(string name, Input<string> id, LocalGatewayRouteState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

DestinationCidrBlock string
IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
LocalGatewayRouteTableId string
Identifier of EC2 Local Gateway Route Table.
LocalGatewayVirtualInterfaceGroupId string
Identifier of EC2 Local Gateway Virtual Interface Group.
DestinationCidrBlock string
IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
LocalGatewayRouteTableId string
Identifier of EC2 Local Gateway Route Table.
LocalGatewayVirtualInterfaceGroupId string
Identifier of EC2 Local Gateway Virtual Interface Group.
destinationCidrBlock string
IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
localGatewayRouteTableId string
Identifier of EC2 Local Gateway Route Table.
localGatewayVirtualInterfaceGroupId string
Identifier of EC2 Local Gateway Virtual Interface Group.
destination_cidr_block str
IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
local_gateway_route_table_id str
Identifier of EC2 Local Gateway Route Table.
local_gateway_virtual_interface_group_id str
Identifier of EC2 Local Gateway Virtual Interface Group.

Import

aws_ec2_local_gateway_route can be imported by using the EC2 Local Gateway Route Table identifier and destination CIDR block separated by underscores (_), e.g.

 $ pulumi import aws:ec2/localGatewayRoute:LocalGatewayRoute example lgw-rtb-12345678_172.16.0.0/16

Package Details

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