1. Packages
  2. Azure Classic
  3. API Docs
  4. network
  5. RouteServerBgpConnection

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.network.RouteServerBgpConnection

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a Bgp Connection for a Route Server

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
        name: "example-vn",
        addressSpaces: ["10.0.0.0/16"],
        resourceGroupName: example.name,
        location: example.location,
        tags: {
            environment: "Production",
        },
    });
    const exampleSubnet = new azure.network.Subnet("example", {
        name: "RouteServerSubnet",
        virtualNetworkName: exampleVirtualNetwork.name,
        resourceGroupName: example.name,
        addressPrefixes: ["10.0.1.0/24"],
    });
    const examplePublicIp = new azure.network.PublicIp("example", {
        name: "example-pip",
        resourceGroupName: example.name,
        location: example.location,
        allocationMethod: "Static",
        sku: "Standard",
    });
    const exampleRouteServer = new azure.network.RouteServer("example", {
        name: "example-routerserver",
        resourceGroupName: example.name,
        location: example.location,
        sku: "Standard",
        publicIpAddressId: examplePublicIp.id,
        subnetId: exampleSubnet.id,
        branchToBranchTrafficEnabled: true,
    });
    const exampleRouteServerBgpConnection = new azure.network.RouteServerBgpConnection("example", {
        name: "example-rs-bgpconnection",
        routeServerId: exampleRouteServer.id,
        peerAsn: 65501,
        peerIp: "169.254.21.5",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_virtual_network = azure.network.VirtualNetwork("example",
        name="example-vn",
        address_spaces=["10.0.0.0/16"],
        resource_group_name=example.name,
        location=example.location,
        tags={
            "environment": "Production",
        })
    example_subnet = azure.network.Subnet("example",
        name="RouteServerSubnet",
        virtual_network_name=example_virtual_network.name,
        resource_group_name=example.name,
        address_prefixes=["10.0.1.0/24"])
    example_public_ip = azure.network.PublicIp("example",
        name="example-pip",
        resource_group_name=example.name,
        location=example.location,
        allocation_method="Static",
        sku="Standard")
    example_route_server = azure.network.RouteServer("example",
        name="example-routerserver",
        resource_group_name=example.name,
        location=example.location,
        sku="Standard",
        public_ip_address_id=example_public_ip.id,
        subnet_id=example_subnet.id,
        branch_to_branch_traffic_enabled=True)
    example_route_server_bgp_connection = azure.network.RouteServerBgpConnection("example",
        name="example-rs-bgpconnection",
        route_server_id=example_route_server.id,
        peer_asn=65501,
        peer_ip="169.254.21.5")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
    			Name: pulumi.String("example-vn"),
    			AddressSpaces: pulumi.StringArray{
    				pulumi.String("10.0.0.0/16"),
    			},
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("Production"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
    			Name:               pulumi.String("RouteServerSubnet"),
    			VirtualNetworkName: exampleVirtualNetwork.Name,
    			ResourceGroupName:  example.Name,
    			AddressPrefixes: pulumi.StringArray{
    				pulumi.String("10.0.1.0/24"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
    			Name:              pulumi.String("example-pip"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    			AllocationMethod:  pulumi.String("Static"),
    			Sku:               pulumi.String("Standard"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleRouteServer, err := network.NewRouteServer(ctx, "example", &network.RouteServerArgs{
    			Name:                         pulumi.String("example-routerserver"),
    			ResourceGroupName:            example.Name,
    			Location:                     example.Location,
    			Sku:                          pulumi.String("Standard"),
    			PublicIpAddressId:            examplePublicIp.ID(),
    			SubnetId:                     exampleSubnet.ID(),
    			BranchToBranchTrafficEnabled: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = network.NewRouteServerBgpConnection(ctx, "example", &network.RouteServerBgpConnectionArgs{
    			Name:          pulumi.String("example-rs-bgpconnection"),
    			RouteServerId: exampleRouteServer.ID(),
    			PeerAsn:       pulumi.Int(65501),
    			PeerIp:        pulumi.String("169.254.21.5"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
        {
            Name = "example-vn",
            AddressSpaces = new[]
            {
                "10.0.0.0/16",
            },
            ResourceGroupName = example.Name,
            Location = example.Location,
            Tags = 
            {
                { "environment", "Production" },
            },
        });
    
        var exampleSubnet = new Azure.Network.Subnet("example", new()
        {
            Name = "RouteServerSubnet",
            VirtualNetworkName = exampleVirtualNetwork.Name,
            ResourceGroupName = example.Name,
            AddressPrefixes = new[]
            {
                "10.0.1.0/24",
            },
        });
    
        var examplePublicIp = new Azure.Network.PublicIp("example", new()
        {
            Name = "example-pip",
            ResourceGroupName = example.Name,
            Location = example.Location,
            AllocationMethod = "Static",
            Sku = "Standard",
        });
    
        var exampleRouteServer = new Azure.Network.RouteServer("example", new()
        {
            Name = "example-routerserver",
            ResourceGroupName = example.Name,
            Location = example.Location,
            Sku = "Standard",
            PublicIpAddressId = examplePublicIp.Id,
            SubnetId = exampleSubnet.Id,
            BranchToBranchTrafficEnabled = true,
        });
    
        var exampleRouteServerBgpConnection = new Azure.Network.RouteServerBgpConnection("example", new()
        {
            Name = "example-rs-bgpconnection",
            RouteServerId = exampleRouteServer.Id,
            PeerAsn = 65501,
            PeerIp = "169.254.21.5",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.network.VirtualNetwork;
    import com.pulumi.azure.network.VirtualNetworkArgs;
    import com.pulumi.azure.network.Subnet;
    import com.pulumi.azure.network.SubnetArgs;
    import com.pulumi.azure.network.PublicIp;
    import com.pulumi.azure.network.PublicIpArgs;
    import com.pulumi.azure.network.RouteServer;
    import com.pulumi.azure.network.RouteServerArgs;
    import com.pulumi.azure.network.RouteServerBgpConnection;
    import com.pulumi.azure.network.RouteServerBgpConnectionArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
                .name("example-vn")
                .addressSpaces("10.0.0.0/16")
                .resourceGroupName(example.name())
                .location(example.location())
                .tags(Map.of("environment", "Production"))
                .build());
    
            var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
                .name("RouteServerSubnet")
                .virtualNetworkName(exampleVirtualNetwork.name())
                .resourceGroupName(example.name())
                .addressPrefixes("10.0.1.0/24")
                .build());
    
            var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
                .name("example-pip")
                .resourceGroupName(example.name())
                .location(example.location())
                .allocationMethod("Static")
                .sku("Standard")
                .build());
    
            var exampleRouteServer = new RouteServer("exampleRouteServer", RouteServerArgs.builder()
                .name("example-routerserver")
                .resourceGroupName(example.name())
                .location(example.location())
                .sku("Standard")
                .publicIpAddressId(examplePublicIp.id())
                .subnetId(exampleSubnet.id())
                .branchToBranchTrafficEnabled(true)
                .build());
    
            var exampleRouteServerBgpConnection = new RouteServerBgpConnection("exampleRouteServerBgpConnection", RouteServerBgpConnectionArgs.builder()
                .name("example-rs-bgpconnection")
                .routeServerId(exampleRouteServer.id())
                .peerAsn(65501)
                .peerIp("169.254.21.5")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleVirtualNetwork:
        type: azure:network:VirtualNetwork
        name: example
        properties:
          name: example-vn
          addressSpaces:
            - 10.0.0.0/16
          resourceGroupName: ${example.name}
          location: ${example.location}
          tags:
            environment: Production
      exampleSubnet:
        type: azure:network:Subnet
        name: example
        properties:
          name: RouteServerSubnet
          virtualNetworkName: ${exampleVirtualNetwork.name}
          resourceGroupName: ${example.name}
          addressPrefixes:
            - 10.0.1.0/24
      examplePublicIp:
        type: azure:network:PublicIp
        name: example
        properties:
          name: example-pip
          resourceGroupName: ${example.name}
          location: ${example.location}
          allocationMethod: Static
          sku: Standard
      exampleRouteServer:
        type: azure:network:RouteServer
        name: example
        properties:
          name: example-routerserver
          resourceGroupName: ${example.name}
          location: ${example.location}
          sku: Standard
          publicIpAddressId: ${examplePublicIp.id}
          subnetId: ${exampleSubnet.id}
          branchToBranchTrafficEnabled: true
      exampleRouteServerBgpConnection:
        type: azure:network:RouteServerBgpConnection
        name: example
        properties:
          name: example-rs-bgpconnection
          routeServerId: ${exampleRouteServer.id}
          peerAsn: 65501
          peerIp: 169.254.21.5
    

    Create RouteServerBgpConnection Resource

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

    Constructor syntax

    new RouteServerBgpConnection(name: string, args: RouteServerBgpConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def RouteServerBgpConnection(resource_name: str,
                                 args: RouteServerBgpConnectionArgs,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def RouteServerBgpConnection(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 peer_asn: Optional[int] = None,
                                 peer_ip: Optional[str] = None,
                                 route_server_id: Optional[str] = None,
                                 name: Optional[str] = None)
    func NewRouteServerBgpConnection(ctx *Context, name string, args RouteServerBgpConnectionArgs, opts ...ResourceOption) (*RouteServerBgpConnection, error)
    public RouteServerBgpConnection(string name, RouteServerBgpConnectionArgs args, CustomResourceOptions? opts = null)
    public RouteServerBgpConnection(String name, RouteServerBgpConnectionArgs args)
    public RouteServerBgpConnection(String name, RouteServerBgpConnectionArgs args, CustomResourceOptions options)
    
    type: azure:network:RouteServerBgpConnection
    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 RouteServerBgpConnectionArgs
    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 RouteServerBgpConnectionArgs
    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 RouteServerBgpConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RouteServerBgpConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RouteServerBgpConnectionArgs
    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 routeServerBgpConnectionResource = new Azure.Network.RouteServerBgpConnection("routeServerBgpConnectionResource", new()
    {
        PeerAsn = 0,
        PeerIp = "string",
        RouteServerId = "string",
        Name = "string",
    });
    
    example, err := network.NewRouteServerBgpConnection(ctx, "routeServerBgpConnectionResource", &network.RouteServerBgpConnectionArgs{
    	PeerAsn:       pulumi.Int(0),
    	PeerIp:        pulumi.String("string"),
    	RouteServerId: pulumi.String("string"),
    	Name:          pulumi.String("string"),
    })
    
    var routeServerBgpConnectionResource = new RouteServerBgpConnection("routeServerBgpConnectionResource", RouteServerBgpConnectionArgs.builder()
        .peerAsn(0)
        .peerIp("string")
        .routeServerId("string")
        .name("string")
        .build());
    
    route_server_bgp_connection_resource = azure.network.RouteServerBgpConnection("routeServerBgpConnectionResource",
        peer_asn=0,
        peer_ip="string",
        route_server_id="string",
        name="string")
    
    const routeServerBgpConnectionResource = new azure.network.RouteServerBgpConnection("routeServerBgpConnectionResource", {
        peerAsn: 0,
        peerIp: "string",
        routeServerId: "string",
        name: "string",
    });
    
    type: azure:network:RouteServerBgpConnection
    properties:
        name: string
        peerAsn: 0
        peerIp: string
        routeServerId: string
    

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

    PeerAsn int
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    PeerIp string
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    RouteServerId string
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    Name string
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    PeerAsn int
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    PeerIp string
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    RouteServerId string
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    Name string
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerAsn Integer
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerIp String
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    routeServerId String
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    name String
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerAsn number
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerIp string
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    routeServerId string
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    name string
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    peer_asn int
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    peer_ip str
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    route_server_id str
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    name str
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerAsn Number
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerIp String
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    routeServerId String
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    name String
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RouteServerBgpConnection Resource

    Get an existing RouteServerBgpConnection 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?: RouteServerBgpConnectionState, opts?: CustomResourceOptions): RouteServerBgpConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            peer_asn: Optional[int] = None,
            peer_ip: Optional[str] = None,
            route_server_id: Optional[str] = None) -> RouteServerBgpConnection
    func GetRouteServerBgpConnection(ctx *Context, name string, id IDInput, state *RouteServerBgpConnectionState, opts ...ResourceOption) (*RouteServerBgpConnection, error)
    public static RouteServerBgpConnection Get(string name, Input<string> id, RouteServerBgpConnectionState? state, CustomResourceOptions? opts = null)
    public static RouteServerBgpConnection get(String name, Output<String> id, RouteServerBgpConnectionState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    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:
    Name string
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    PeerAsn int
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    PeerIp string
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    RouteServerId string
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    Name string
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    PeerAsn int
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    PeerIp string
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    RouteServerId string
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    name String
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerAsn Integer
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerIp String
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    routeServerId String
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    name string
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerAsn number
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerIp string
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    routeServerId string
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    name str
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    peer_asn int
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    peer_ip str
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    route_server_id str
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.
    name String
    The name which should be used for this Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerAsn Number
    The peer autonomous system number for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    peerIp String
    The peer ip address for the Route Server Bgp Connection. Changing this forces a new resource to be created.
    routeServerId String
    The ID of the Route Server within which this Bgp connection should be created. Changing this forces a new resource to be created.

    Import

    Route Server Bgp Connections can be imported using the resource id, e.g.

    $ pulumi import azure:network/routeServerBgpConnection:RouteServerBgpConnection example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/virtualHubs/routeServer1/bgpConnections/connection1
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi