1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. Route
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.34.0 published on Thursday, Mar 28, 2024 by Pulumi

azure-native.network.Route

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.34.0 published on Thursday, Mar 28, 2024 by Pulumi

    Route resource. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.

    Other available API versions: 2019-06-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01.

    Example Usage

    Create route

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var route = new AzureNative.Network.Route("route", new()
        {
            AddressPrefix = "10.0.3.0/24",
            NextHopType = AzureNative.Network.RouteNextHopType.VirtualNetworkGateway,
            ResourceGroupName = "rg1",
            RouteName = "route1",
            RouteTableName = "testrt",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/network/v2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := network.NewRoute(ctx, "route", &network.RouteArgs{
    			AddressPrefix:     pulumi.String("10.0.3.0/24"),
    			NextHopType:       pulumi.String(network.RouteNextHopTypeVirtualNetworkGateway),
    			ResourceGroupName: pulumi.String("rg1"),
    			RouteName:         pulumi.String("route1"),
    			RouteTableName:    pulumi.String("testrt"),
    		})
    		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.azurenative.network.Route;
    import com.pulumi.azurenative.network.RouteArgs;
    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) {
            var route = new Route("route", RouteArgs.builder()        
                .addressPrefix("10.0.3.0/24")
                .nextHopType("VirtualNetworkGateway")
                .resourceGroupName("rg1")
                .routeName("route1")
                .routeTableName("testrt")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    route = azure_native.network.Route("route",
        address_prefix="10.0.3.0/24",
        next_hop_type=azure_native.network.RouteNextHopType.VIRTUAL_NETWORK_GATEWAY,
        resource_group_name="rg1",
        route_name="route1",
        route_table_name="testrt")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const route = new azure_native.network.Route("route", {
        addressPrefix: "10.0.3.0/24",
        nextHopType: azure_native.network.RouteNextHopType.VirtualNetworkGateway,
        resourceGroupName: "rg1",
        routeName: "route1",
        routeTableName: "testrt",
    });
    
    resources:
      route:
        type: azure-native:network:Route
        properties:
          addressPrefix: 10.0.3.0/24
          nextHopType: VirtualNetworkGateway
          resourceGroupName: rg1
          routeName: route1
          routeTableName: testrt
    

    Create Route Resource

    new Route(name: string, args: RouteArgs, opts?: CustomResourceOptions);
    @overload
    def Route(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              address_prefix: Optional[str] = None,
              has_bgp_override: Optional[bool] = None,
              id: Optional[str] = None,
              name: Optional[str] = None,
              next_hop_ip_address: Optional[str] = None,
              next_hop_type: Optional[Union[str, RouteNextHopType]] = None,
              resource_group_name: Optional[str] = None,
              route_name: Optional[str] = None,
              route_table_name: Optional[str] = None,
              type: Optional[str] = None)
    @overload
    def Route(resource_name: str,
              args: RouteInitArgs,
              opts: Optional[ResourceOptions] = None)
    func NewRoute(ctx *Context, name string, args RouteArgs, opts ...ResourceOption) (*Route, error)
    public Route(string name, RouteArgs args, CustomResourceOptions? opts = null)
    public Route(String name, RouteArgs args)
    public Route(String name, RouteArgs args, CustomResourceOptions options)
    
    type: azure-native:network:Route
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RouteArgs
    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 RouteInitArgs
    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 RouteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RouteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RouteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Route Resource Properties

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

    Inputs

    The Route resource accepts the following input properties:

    NextHopType string | Pulumi.AzureNative.Network.RouteNextHopType
    The type of Azure hop the packet should be sent to.
    ResourceGroupName string
    The name of the resource group.
    RouteTableName string
    The name of the route table.
    AddressPrefix string
    The destination CIDR to which the route applies.
    HasBgpOverride bool
    A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
    Id string
    Resource ID.
    Name string
    The name of the resource that is unique within a resource group. This name can be used to access the resource.
    NextHopIpAddress string
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    RouteName string
    The name of the route.
    Type string
    The type of the resource.
    NextHopType string | RouteNextHopType
    The type of Azure hop the packet should be sent to.
    ResourceGroupName string
    The name of the resource group.
    RouteTableName string
    The name of the route table.
    AddressPrefix string
    The destination CIDR to which the route applies.
    HasBgpOverride bool
    A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
    Id string
    Resource ID.
    Name string
    The name of the resource that is unique within a resource group. This name can be used to access the resource.
    NextHopIpAddress string
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    RouteName string
    The name of the route.
    Type string
    The type of the resource.
    nextHopType String | RouteNextHopType
    The type of Azure hop the packet should be sent to.
    resourceGroupName String
    The name of the resource group.
    routeTableName String
    The name of the route table.
    addressPrefix String
    The destination CIDR to which the route applies.
    hasBgpOverride Boolean
    A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
    id String
    Resource ID.
    name String
    The name of the resource that is unique within a resource group. This name can be used to access the resource.
    nextHopIpAddress String
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    routeName String
    The name of the route.
    type String
    The type of the resource.
    nextHopType string | RouteNextHopType
    The type of Azure hop the packet should be sent to.
    resourceGroupName string
    The name of the resource group.
    routeTableName string
    The name of the route table.
    addressPrefix string
    The destination CIDR to which the route applies.
    hasBgpOverride boolean
    A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
    id string
    Resource ID.
    name string
    The name of the resource that is unique within a resource group. This name can be used to access the resource.
    nextHopIpAddress string
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    routeName string
    The name of the route.
    type string
    The type of the resource.
    next_hop_type str | RouteNextHopType
    The type of Azure hop the packet should be sent to.
    resource_group_name str
    The name of the resource group.
    route_table_name str
    The name of the route table.
    address_prefix str
    The destination CIDR to which the route applies.
    has_bgp_override bool
    A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
    id str
    Resource ID.
    name str
    The name of the resource that is unique within a resource group. This name can be used to access the resource.
    next_hop_ip_address str
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    route_name str
    The name of the route.
    type str
    The type of the resource.
    nextHopType String | "VirtualNetworkGateway" | "VnetLocal" | "Internet" | "VirtualAppliance" | "None"
    The type of Azure hop the packet should be sent to.
    resourceGroupName String
    The name of the resource group.
    routeTableName String
    The name of the route table.
    addressPrefix String
    The destination CIDR to which the route applies.
    hasBgpOverride Boolean
    A value indicating whether this route overrides overlapping BGP routes regardless of LPM.
    id String
    Resource ID.
    name String
    The name of the resource that is unique within a resource group. This name can be used to access the resource.
    nextHopIpAddress String
    The IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance.
    routeName String
    The name of the route.
    type String
    The type of the resource.

    Outputs

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

    Etag string
    A unique read-only string that changes whenever the resource is updated.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProvisioningState string
    The provisioning state of the route resource.
    Etag string
    A unique read-only string that changes whenever the resource is updated.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProvisioningState string
    The provisioning state of the route resource.
    etag String
    A unique read-only string that changes whenever the resource is updated.
    id String
    The provider-assigned unique ID for this managed resource.
    provisioningState String
    The provisioning state of the route resource.
    etag string
    A unique read-only string that changes whenever the resource is updated.
    id string
    The provider-assigned unique ID for this managed resource.
    provisioningState string
    The provisioning state of the route resource.
    etag str
    A unique read-only string that changes whenever the resource is updated.
    id str
    The provider-assigned unique ID for this managed resource.
    provisioning_state str
    The provisioning state of the route resource.
    etag String
    A unique read-only string that changes whenever the resource is updated.
    id String
    The provider-assigned unique ID for this managed resource.
    provisioningState String
    The provisioning state of the route resource.

    Supporting Types

    RouteNextHopType, RouteNextHopTypeArgs

    VirtualNetworkGateway
    VirtualNetworkGateway
    VnetLocal
    VnetLocal
    Internet
    Internet
    VirtualAppliance
    VirtualAppliance
    None
    None
    RouteNextHopTypeVirtualNetworkGateway
    VirtualNetworkGateway
    RouteNextHopTypeVnetLocal
    VnetLocal
    RouteNextHopTypeInternet
    Internet
    RouteNextHopTypeVirtualAppliance
    VirtualAppliance
    RouteNextHopTypeNone
    None
    VirtualNetworkGateway
    VirtualNetworkGateway
    VnetLocal
    VnetLocal
    Internet
    Internet
    VirtualAppliance
    VirtualAppliance
    None
    None
    VirtualNetworkGateway
    VirtualNetworkGateway
    VnetLocal
    VnetLocal
    Internet
    Internet
    VirtualAppliance
    VirtualAppliance
    None
    None
    VIRTUAL_NETWORK_GATEWAY
    VirtualNetworkGateway
    VNET_LOCAL
    VnetLocal
    INTERNET
    Internet
    VIRTUAL_APPLIANCE
    VirtualAppliance
    NONE
    None
    "VirtualNetworkGateway"
    VirtualNetworkGateway
    "VnetLocal"
    VnetLocal
    "Internet"
    Internet
    "VirtualAppliance"
    VirtualAppliance
    "None"
    None

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:network:Route route1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName} 
    

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.34.0 published on Thursday, Mar 28, 2024 by Pulumi