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/v2/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v2/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.String(data.Aws_ec2_local_gateway_route_table.Example.Id),
LocalGatewayVirtualInterfaceGroupId: pulumi.String(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);def LocalGatewayRoute(resource_name, opts=None, destination_cidr_block=None, local_gateway_route_table_id=None, local_gateway_virtual_interface_group_id=None, __props__=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.
- opts ResourceOptions
- A bag of options that control this 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:
- Destination
Cidr stringBlock IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
- Local
Gateway stringRoute Table Id Identifier of EC2 Local Gateway Route Table.
- Local
Gateway stringVirtual Interface Group Id Identifier of EC2 Local Gateway Virtual Interface Group.
- Destination
Cidr stringBlock IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
- Local
Gateway stringRoute Table Id Identifier of EC2 Local Gateway Route Table.
- Local
Gateway stringVirtual Interface Group Id Identifier of EC2 Local Gateway Virtual Interface Group.
- destination
Cidr stringBlock IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
- local
Gateway stringRoute Table Id Identifier of EC2 Local Gateway Route Table.
- local
Gateway stringVirtual Interface Group Id Identifier of EC2 Local Gateway Virtual Interface Group.
- destination_
cidr_ strblock IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
- local_
gateway_ strroute_ table_ id Identifier of EC2 Local Gateway Route Table.
- local_
gateway_ strvirtual_ interface_ group_ id 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:
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): LocalGatewayRoutestatic get(resource_name, id, opts=None, destination_cidr_block=None, local_gateway_route_table_id=None, local_gateway_virtual_interface_group_id=None, __props__=None);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:
- Destination
Cidr stringBlock IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
- Local
Gateway stringRoute Table Id Identifier of EC2 Local Gateway Route Table.
- Local
Gateway stringVirtual Interface Group Id Identifier of EC2 Local Gateway Virtual Interface Group.
- Destination
Cidr stringBlock IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
- Local
Gateway stringRoute Table Id Identifier of EC2 Local Gateway Route Table.
- Local
Gateway stringVirtual Interface Group Id Identifier of EC2 Local Gateway Virtual Interface Group.
- destination
Cidr stringBlock IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
- local
Gateway stringRoute Table Id Identifier of EC2 Local Gateway Route Table.
- local
Gateway stringVirtual Interface Group Id Identifier of EC2 Local Gateway Virtual Interface Group.
- destination_
cidr_ strblock IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
- local_
gateway_ strroute_ table_ id Identifier of EC2 Local Gateway Route Table.
- local_
gateway_ strvirtual_ interface_ group_ id Identifier of EC2 Local Gateway Virtual Interface Group.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.