Class Route
Manages a Route within a Route Table.
NOTE on Route Tables and Routes: This provider currently provides both a standalone Route resource, and allows for Routes to be defined in-line within the Route Table resource. At this time you cannot use a Route Table with in-line Routes in conjunction with any Route resources. Doing so will cause a conflict of Route configurations and will overwrite Routes.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West US",
});
var exampleRouteTable = new Azure.Network.RouteTable("exampleRouteTable", new Azure.Network.RouteTableArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
});
var exampleRoute = new Azure.Network.Route("exampleRoute", new Azure.Network.RouteArgs
{
ResourceGroupName = exampleResourceGroup.Name,
RouteTableName = exampleRouteTable.Name,
AddressPrefix = "10.1.0.0/16",
NextHopType = "vnetlocal",
});
}
}
Inherited Members
Namespace: Pulumi.Azure.Network
Assembly: Pulumi.Azure.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 SourceAddressPrefix
The destination CIDR to which the route applies, such as 10.1.0.0/16
Declaration
public Output<string> AddressPrefix { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the route. Changing this forces a new resource to be created.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NextHopInIpAddress
Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
Declaration
public Output<string> NextHopInIpAddress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NextHopType
The type of Azure hop the packet should be sent to. Possible values are VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None
Declaration
public Output<string> NextHopType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceGroupName
The name of the resource group in which to create the route. Changing this forces a new resource to be created.
Declaration
public Output<string> ResourceGroupName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
RouteTableName
The name of the route table within which create the route. Changing this forces a new resource to be created.
Declaration
public Output<string> RouteTableName { 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 |