Class Route
Manages an EC2 Transit Gateway Route.
Example Usage
Standard usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Ec2TransitGateway.Route("example", new Aws.Ec2TransitGateway.RouteArgs
{
DestinationCidrBlock = "0.0.0.0/0",
TransitGatewayAttachmentId = aws_ec2_transit_gateway_vpc_attachment.Example.Id,
TransitGatewayRouteTableId = aws_ec2_transit_gateway.Example.Association_default_route_table_id,
});
}
}
Blackhole route
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Ec2TransitGateway.Route("example", new Aws.Ec2TransitGateway.RouteArgs
{
Blackhole = true,
DestinationCidrBlock = "0.0.0.0/0",
TransitGatewayRouteTableId = aws_ec2_transit_gateway.Example.Association_default_route_table_id,
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Ec2TransitGateway
Assembly: Pulumi.Aws.dll
Syntax
public class Route : CustomResource
Constructors
View SourceRoute(String, RouteArgs, CustomResourceOptions)
Create a Route resource with the given unique name, arguments, and options.
Declaration
public Route(string name, RouteArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| RouteArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceBlackhole
Indicates whether to drop traffic that matches this route (default to false).
Declaration
public Output<bool?> Blackhole { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
DestinationCidrBlock
IPv4 CIDR range used for destination matches. Routing decisions are based on the most specific match.
Declaration
public Output<string> DestinationCidrBlock { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TransitGatewayAttachmentId
Identifier of EC2 Transit Gateway Attachment (required if blackhole is set to false).
Declaration
public Output<string> TransitGatewayAttachmentId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
TransitGatewayRouteTableId
Identifier of EC2 Transit Gateway Route Table.
Declaration
public Output<string> TransitGatewayRouteTableId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, RouteState, CustomResourceOptions)
Get an existing Route resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Route Get(string name, Input<string> id, RouteState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| RouteState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Route |