alicloud logo
Alibaba Cloud v3.37.0, May 15 23

alicloud.vpc.BgpGroup

Explore with Pulumi AI

Provides a VPC Bgp Group resource.

For information about VPC Bgp Group and how to use it, see What is Bgp Group.

NOTE: Available in v1.152.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var examplePhysicalConnections = AliCloud.ExpressConnect.GetPhysicalConnections.Invoke();

    var exampleVirtualBorderRouter = new AliCloud.ExpressConnect.VirtualBorderRouter("exampleVirtualBorderRouter", new()
    {
        LocalGatewayIp = "10.0.0.1",
        PeerGatewayIp = "10.0.0.2",
        PeeringSubnetMask = "255.255.255.252",
        PhysicalConnectionId = examplePhysicalConnections.Apply(getPhysicalConnectionsResult => getPhysicalConnectionsResult.Connections[0]?.Id),
        VirtualBorderRouterName = @var.Name,
        VlanId = 120,
        MinRxInterval = 1000,
        MinTxInterval = 1000,
        DetectMultiplier = 10,
    });

    var @default = new AliCloud.Vpc.BgpGroup("default", new()
    {
        AuthKey = "YourPassword+12345678",
        BgpGroupName = "example_value",
        Description = "example_value",
        LocalAsn = 64512,
        PeerAsn = 1111,
        RouterId = exampleVirtualBorderRouter.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/expressconnect"
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		examplePhysicalConnections, err := expressconnect.GetPhysicalConnections(ctx, nil, nil)
		if err != nil {
			return err
		}
		exampleVirtualBorderRouter, err := expressconnect.NewVirtualBorderRouter(ctx, "exampleVirtualBorderRouter", &expressconnect.VirtualBorderRouterArgs{
			LocalGatewayIp:          pulumi.String("10.0.0.1"),
			PeerGatewayIp:           pulumi.String("10.0.0.2"),
			PeeringSubnetMask:       pulumi.String("255.255.255.252"),
			PhysicalConnectionId:    *pulumi.String(examplePhysicalConnections.Connections[0].Id),
			VirtualBorderRouterName: pulumi.Any(_var.Name),
			VlanId:                  pulumi.Int(120),
			MinRxInterval:           pulumi.Int(1000),
			MinTxInterval:           pulumi.Int(1000),
			DetectMultiplier:        pulumi.Int(10),
		})
		if err != nil {
			return err
		}
		_, err = vpc.NewBgpGroup(ctx, "default", &vpc.BgpGroupArgs{
			AuthKey:      pulumi.String("YourPassword+12345678"),
			BgpGroupName: pulumi.String("example_value"),
			Description:  pulumi.String("example_value"),
			LocalAsn:     pulumi.Int(64512),
			PeerAsn:      pulumi.Int(1111),
			RouterId:     exampleVirtualBorderRouter.ID(),
		})
		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.alicloud.expressconnect.ExpressconnectFunctions;
import com.pulumi.alicloud.expressconnect.inputs.GetPhysicalConnectionsArgs;
import com.pulumi.alicloud.expressconnect.VirtualBorderRouter;
import com.pulumi.alicloud.expressconnect.VirtualBorderRouterArgs;
import com.pulumi.alicloud.vpc.BgpGroup;
import com.pulumi.alicloud.vpc.BgpGroupArgs;
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) {
        final var examplePhysicalConnections = ExpressconnectFunctions.getPhysicalConnections();

        var exampleVirtualBorderRouter = new VirtualBorderRouter("exampleVirtualBorderRouter", VirtualBorderRouterArgs.builder()        
            .localGatewayIp("10.0.0.1")
            .peerGatewayIp("10.0.0.2")
            .peeringSubnetMask("255.255.255.252")
            .physicalConnectionId(examplePhysicalConnections.applyValue(getPhysicalConnectionsResult -> getPhysicalConnectionsResult.connections()[0].id()))
            .virtualBorderRouterName(var_.name())
            .vlanId(120)
            .minRxInterval(1000)
            .minTxInterval(1000)
            .detectMultiplier(10)
            .build());

        var default_ = new BgpGroup("default", BgpGroupArgs.builder()        
            .authKey("YourPassword+12345678")
            .bgpGroupName("example_value")
            .description("example_value")
            .localAsn(64512)
            .peerAsn(1111)
            .routerId(exampleVirtualBorderRouter.id())
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example_physical_connections = alicloud.expressconnect.get_physical_connections()
example_virtual_border_router = alicloud.expressconnect.VirtualBorderRouter("exampleVirtualBorderRouter",
    local_gateway_ip="10.0.0.1",
    peer_gateway_ip="10.0.0.2",
    peering_subnet_mask="255.255.255.252",
    physical_connection_id=example_physical_connections.connections[0].id,
    virtual_border_router_name=var["name"],
    vlan_id=120,
    min_rx_interval=1000,
    min_tx_interval=1000,
    detect_multiplier=10)
default = alicloud.vpc.BgpGroup("default",
    auth_key="YourPassword+12345678",
    bgp_group_name="example_value",
    description="example_value",
    local_asn=64512,
    peer_asn=1111,
    router_id=example_virtual_border_router.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const examplePhysicalConnections = alicloud.expressconnect.getPhysicalConnections({});
const exampleVirtualBorderRouter = new alicloud.expressconnect.VirtualBorderRouter("exampleVirtualBorderRouter", {
    localGatewayIp: "10.0.0.1",
    peerGatewayIp: "10.0.0.2",
    peeringSubnetMask: "255.255.255.252",
    physicalConnectionId: examplePhysicalConnections.then(examplePhysicalConnections => examplePhysicalConnections.connections?.[0]?.id),
    virtualBorderRouterName: _var.name,
    vlanId: 120,
    minRxInterval: 1000,
    minTxInterval: 1000,
    detectMultiplier: 10,
});
const _default = new alicloud.vpc.BgpGroup("default", {
    authKey: "YourPassword+12345678",
    bgpGroupName: "example_value",
    description: "example_value",
    localAsn: 64512,
    peerAsn: 1111,
    routerId: exampleVirtualBorderRouter.id,
});
resources:
  exampleVirtualBorderRouter:
    type: alicloud:expressconnect:VirtualBorderRouter
    properties:
      localGatewayIp: 10.0.0.1
      peerGatewayIp: 10.0.0.2
      peeringSubnetMask: 255.255.255.252
      physicalConnectionId: ${examplePhysicalConnections.connections[0].id}
      virtualBorderRouterName: ${var.name}
      vlanId: 120
      minRxInterval: 1000
      minTxInterval: 1000
      detectMultiplier: 10
  default:
    type: alicloud:vpc:BgpGroup
    properties:
      authKey: YourPassword+12345678
      bgpGroupName: example_value
      description: example_value
      localAsn: 64512
      peerAsn: 1111
      routerId: ${exampleVirtualBorderRouter.id}
variables:
  examplePhysicalConnections:
    fn::invoke:
      Function: alicloud:expressconnect:getPhysicalConnections
      Arguments: {}

Create BgpGroup Resource

new BgpGroup(name: string, args: BgpGroupArgs, opts?: CustomResourceOptions);
@overload
def BgpGroup(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             auth_key: Optional[str] = None,
             bgp_group_name: Optional[str] = None,
             description: Optional[str] = None,
             is_fake_asn: Optional[bool] = None,
             local_asn: Optional[int] = None,
             peer_asn: Optional[int] = None,
             router_id: Optional[str] = None)
@overload
def BgpGroup(resource_name: str,
             args: BgpGroupArgs,
             opts: Optional[ResourceOptions] = None)
func NewBgpGroup(ctx *Context, name string, args BgpGroupArgs, opts ...ResourceOption) (*BgpGroup, error)
public BgpGroup(string name, BgpGroupArgs args, CustomResourceOptions? opts = null)
public BgpGroup(String name, BgpGroupArgs args)
public BgpGroup(String name, BgpGroupArgs args, CustomResourceOptions options)
type: alicloud:vpc:BgpGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

PeerAsn int

The AS number of the BGP peer.

RouterId string

The ID of the VBR.

AuthKey string

The authentication key of the BGP group.

BgpGroupName string

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

Description string

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

IsFakeAsn bool

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

LocalAsn int

The AS number on the Alibaba Cloud side.

PeerAsn int

The AS number of the BGP peer.

RouterId string

The ID of the VBR.

AuthKey string

The authentication key of the BGP group.

BgpGroupName string

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

Description string

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

IsFakeAsn bool

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

LocalAsn int

The AS number on the Alibaba Cloud side.

peerAsn Integer

The AS number of the BGP peer.

routerId String

The ID of the VBR.

authKey String

The authentication key of the BGP group.

bgpGroupName String

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

description String

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

isFakeAsn Boolean

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

localAsn Integer

The AS number on the Alibaba Cloud side.

peerAsn number

The AS number of the BGP peer.

routerId string

The ID of the VBR.

authKey string

The authentication key of the BGP group.

bgpGroupName string

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

description string

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

isFakeAsn boolean

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

localAsn number

The AS number on the Alibaba Cloud side.

peer_asn int

The AS number of the BGP peer.

router_id str

The ID of the VBR.

auth_key str

The authentication key of the BGP group.

bgp_group_name str

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

description str

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

is_fake_asn bool

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

local_asn int

The AS number on the Alibaba Cloud side.

peerAsn Number

The AS number of the BGP peer.

routerId String

The ID of the VBR.

authKey String

The authentication key of the BGP group.

bgpGroupName String

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

description String

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

isFakeAsn Boolean

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

localAsn Number

The AS number on the Alibaba Cloud side.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the resource.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the resource.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the resource.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of the resource.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of the resource.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the resource.

Look up Existing BgpGroup Resource

Get an existing BgpGroup 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?: BgpGroupState, opts?: CustomResourceOptions): BgpGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        auth_key: Optional[str] = None,
        bgp_group_name: Optional[str] = None,
        description: Optional[str] = None,
        is_fake_asn: Optional[bool] = None,
        local_asn: Optional[int] = None,
        peer_asn: Optional[int] = None,
        router_id: Optional[str] = None,
        status: Optional[str] = None) -> BgpGroup
func GetBgpGroup(ctx *Context, name string, id IDInput, state *BgpGroupState, opts ...ResourceOption) (*BgpGroup, error)
public static BgpGroup Get(string name, Input<string> id, BgpGroupState? state, CustomResourceOptions? opts = null)
public static BgpGroup get(String name, Output<String> id, BgpGroupState 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:
AuthKey string

The authentication key of the BGP group.

BgpGroupName string

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

Description string

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

IsFakeAsn bool

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

LocalAsn int

The AS number on the Alibaba Cloud side.

PeerAsn int

The AS number of the BGP peer.

RouterId string

The ID of the VBR.

Status string

The status of the resource.

AuthKey string

The authentication key of the BGP group.

BgpGroupName string

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

Description string

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

IsFakeAsn bool

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

LocalAsn int

The AS number on the Alibaba Cloud side.

PeerAsn int

The AS number of the BGP peer.

RouterId string

The ID of the VBR.

Status string

The status of the resource.

authKey String

The authentication key of the BGP group.

bgpGroupName String

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

description String

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

isFakeAsn Boolean

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

localAsn Integer

The AS number on the Alibaba Cloud side.

peerAsn Integer

The AS number of the BGP peer.

routerId String

The ID of the VBR.

status String

The status of the resource.

authKey string

The authentication key of the BGP group.

bgpGroupName string

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

description string

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

isFakeAsn boolean

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

localAsn number

The AS number on the Alibaba Cloud side.

peerAsn number

The AS number of the BGP peer.

routerId string

The ID of the VBR.

status string

The status of the resource.

auth_key str

The authentication key of the BGP group.

bgp_group_name str

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

description str

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

is_fake_asn bool

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

local_asn int

The AS number on the Alibaba Cloud side.

peer_asn int

The AS number of the BGP peer.

router_id str

The ID of the VBR.

status str

The status of the resource.

authKey String

The authentication key of the BGP group.

bgpGroupName String

The name of the BGP group. The name must be 2 to 128 characters in length and can contain digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter but cannot start with http:// or https://.

description String

The description of the BGP group. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with http:// or https://.

isFakeAsn Boolean

The is fake asn. A router that runs BGP typically belongs to only one AS. In some cases, for example, the AS needs to be migrated or is merged with another AS, a new AS number replaces the original one.

localAsn Number

The AS number on the Alibaba Cloud side.

peerAsn Number

The AS number of the BGP peer.

routerId String

The ID of the VBR.

status String

The status of the resource.

Import

VPC Bgp Group can be imported using the id, e.g.

 $ pulumi import alicloud:vpc/bgpGroup:BgpGroup example <id>

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.