1. Packages
  2. Azure Native
  3. API Docs
  4. network
  5. VirtualRouterPeering
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.63.0 published on Tuesday, Sep 24, 2024 by Pulumi

azure-native.network.VirtualRouterPeering

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.63.0 published on Tuesday, Sep 24, 2024 by Pulumi

    Virtual Router Peering resource. Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2022-01-01.

    Other available API versions: 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01.

    Example Usage

    Create Virtual Router Peering

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var virtualRouterPeering = new AzureNative.Network.VirtualRouterPeering("virtualRouterPeering", new()
        {
            PeerAsn = 20000,
            PeerIp = "192.168.1.5",
            PeeringName = "peering1",
            ResourceGroupName = "rg1",
            VirtualRouterName = "virtualRouter",
        });
    
    });
    
    package main
    
    import (
    	network "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.NewVirtualRouterPeering(ctx, "virtualRouterPeering", &network.VirtualRouterPeeringArgs{
    			PeerAsn:           pulumi.Float64(20000),
    			PeerIp:            pulumi.String("192.168.1.5"),
    			PeeringName:       pulumi.String("peering1"),
    			ResourceGroupName: pulumi.String("rg1"),
    			VirtualRouterName: pulumi.String("virtualRouter"),
    		})
    		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.VirtualRouterPeering;
    import com.pulumi.azurenative.network.VirtualRouterPeeringArgs;
    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 virtualRouterPeering = new VirtualRouterPeering("virtualRouterPeering", VirtualRouterPeeringArgs.builder()
                .peerAsn(20000)
                .peerIp("192.168.1.5")
                .peeringName("peering1")
                .resourceGroupName("rg1")
                .virtualRouterName("virtualRouter")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    virtual_router_peering = azure_native.network.VirtualRouterPeering("virtualRouterPeering",
        peer_asn=20000,
        peer_ip="192.168.1.5",
        peering_name="peering1",
        resource_group_name="rg1",
        virtual_router_name="virtualRouter")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const virtualRouterPeering = new azure_native.network.VirtualRouterPeering("virtualRouterPeering", {
        peerAsn: 20000,
        peerIp: "192.168.1.5",
        peeringName: "peering1",
        resourceGroupName: "rg1",
        virtualRouterName: "virtualRouter",
    });
    
    resources:
      virtualRouterPeering:
        type: azure-native:network:VirtualRouterPeering
        properties:
          peerAsn: 20000
          peerIp: 192.168.1.5
          peeringName: peering1
          resourceGroupName: rg1
          virtualRouterName: virtualRouter
    

    Create VirtualRouterPeering Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VirtualRouterPeering(name: string, args: VirtualRouterPeeringArgs, opts?: CustomResourceOptions);
    @overload
    def VirtualRouterPeering(resource_name: str,
                             args: VirtualRouterPeeringArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def VirtualRouterPeering(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             resource_group_name: Optional[str] = None,
                             virtual_router_name: Optional[str] = None,
                             id: Optional[str] = None,
                             name: Optional[str] = None,
                             peer_asn: Optional[float] = None,
                             peer_ip: Optional[str] = None,
                             peering_name: Optional[str] = None)
    func NewVirtualRouterPeering(ctx *Context, name string, args VirtualRouterPeeringArgs, opts ...ResourceOption) (*VirtualRouterPeering, error)
    public VirtualRouterPeering(string name, VirtualRouterPeeringArgs args, CustomResourceOptions? opts = null)
    public VirtualRouterPeering(String name, VirtualRouterPeeringArgs args)
    public VirtualRouterPeering(String name, VirtualRouterPeeringArgs args, CustomResourceOptions options)
    
    type: azure-native:network:VirtualRouterPeering
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VirtualRouterPeeringArgs
    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 VirtualRouterPeeringArgs
    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 VirtualRouterPeeringArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VirtualRouterPeeringArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VirtualRouterPeeringArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var virtualRouterPeeringResource = new AzureNative.Network.VirtualRouterPeering("virtualRouterPeeringResource", new()
    {
        ResourceGroupName = "string",
        VirtualRouterName = "string",
        Id = "string",
        Name = "string",
        PeerAsn = 0,
        PeerIp = "string",
        PeeringName = "string",
    });
    
    example, err := network.NewVirtualRouterPeering(ctx, "virtualRouterPeeringResource", &network.VirtualRouterPeeringArgs{
    	ResourceGroupName: pulumi.String("string"),
    	VirtualRouterName: pulumi.String("string"),
    	Id:                pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	PeerAsn:           pulumi.Float64(0),
    	PeerIp:            pulumi.String("string"),
    	PeeringName:       pulumi.String("string"),
    })
    
    var virtualRouterPeeringResource = new VirtualRouterPeering("virtualRouterPeeringResource", VirtualRouterPeeringArgs.builder()
        .resourceGroupName("string")
        .virtualRouterName("string")
        .id("string")
        .name("string")
        .peerAsn(0)
        .peerIp("string")
        .peeringName("string")
        .build());
    
    virtual_router_peering_resource = azure_native.network.VirtualRouterPeering("virtualRouterPeeringResource",
        resource_group_name="string",
        virtual_router_name="string",
        id="string",
        name="string",
        peer_asn=0,
        peer_ip="string",
        peering_name="string")
    
    const virtualRouterPeeringResource = new azure_native.network.VirtualRouterPeering("virtualRouterPeeringResource", {
        resourceGroupName: "string",
        virtualRouterName: "string",
        id: "string",
        name: "string",
        peerAsn: 0,
        peerIp: "string",
        peeringName: "string",
    });
    
    type: azure-native:network:VirtualRouterPeering
    properties:
        id: string
        name: string
        peerAsn: 0
        peerIp: string
        peeringName: string
        resourceGroupName: string
        virtualRouterName: string
    

    VirtualRouterPeering 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 VirtualRouterPeering resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group.
    VirtualRouterName string
    The name of the Virtual Router.
    Id string
    Resource ID.
    Name string
    Name of the virtual router peering that is unique within a virtual router.
    PeerAsn double
    Peer ASN.
    PeerIp string
    Peer IP.
    PeeringName string
    The name of the Virtual Router Peering.
    ResourceGroupName string
    The name of the resource group.
    VirtualRouterName string
    The name of the Virtual Router.
    Id string
    Resource ID.
    Name string
    Name of the virtual router peering that is unique within a virtual router.
    PeerAsn float64
    Peer ASN.
    PeerIp string
    Peer IP.
    PeeringName string
    The name of the Virtual Router Peering.
    resourceGroupName String
    The name of the resource group.
    virtualRouterName String
    The name of the Virtual Router.
    id String
    Resource ID.
    name String
    Name of the virtual router peering that is unique within a virtual router.
    peerAsn Double
    Peer ASN.
    peerIp String
    Peer IP.
    peeringName String
    The name of the Virtual Router Peering.
    resourceGroupName string
    The name of the resource group.
    virtualRouterName string
    The name of the Virtual Router.
    id string
    Resource ID.
    name string
    Name of the virtual router peering that is unique within a virtual router.
    peerAsn number
    Peer ASN.
    peerIp string
    Peer IP.
    peeringName string
    The name of the Virtual Router Peering.
    resource_group_name str
    The name of the resource group.
    virtual_router_name str
    The name of the Virtual Router.
    id str
    Resource ID.
    name str
    Name of the virtual router peering that is unique within a virtual router.
    peer_asn float
    Peer ASN.
    peer_ip str
    Peer IP.
    peering_name str
    The name of the Virtual Router Peering.
    resourceGroupName String
    The name of the resource group.
    virtualRouterName String
    The name of the Virtual Router.
    id String
    Resource ID.
    name String
    Name of the virtual router peering that is unique within a virtual router.
    peerAsn Number
    Peer ASN.
    peerIp String
    Peer IP.
    peeringName String
    The name of the Virtual Router Peering.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VirtualRouterPeering 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 resource.
    Type string
    Peering type.
    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 resource.
    Type string
    Peering type.
    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 resource.
    type String
    Peering type.
    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 resource.
    type string
    Peering type.
    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 resource.
    type str
    Peering type.
    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 resource.
    type String
    Peering type.

    Import

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

    $ pulumi import azure-native:network:VirtualRouterPeering peering1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName} 
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.63.0 published on Tuesday, Sep 24, 2024 by Pulumi