1. Packages
  2. Vkcs Provider
  3. API Docs
  4. DcBgpInstance
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.DcBgpInstance

Explore with Pulumi AI

Manages a direct connect BGP instance resource.

Note: This resource requires Sprut SDN to be enabled in your project.

New since v0.5.0.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";

const dcBgpInstance = new vkcs.DcBgpInstance("dcBgpInstance", {
    description: "tf-example-description",
    dcRouterId: vkcs_dc_router.dc_router.id,
    bgpRouterId: "192.168.1.2",
    asn: 12345,
    ecmpEnabled: true,
    gracefulRestart: true,
});
Copy
import pulumi
import pulumi_vkcs as vkcs

dc_bgp_instance = vkcs.DcBgpInstance("dcBgpInstance",
    description="tf-example-description",
    dc_router_id=vkcs_dc_router["dc_router"]["id"],
    bgp_router_id="192.168.1.2",
    asn=12345,
    ecmp_enabled=True,
    graceful_restart=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vkcs.NewDcBgpInstance(ctx, "dcBgpInstance", &vkcs.DcBgpInstanceArgs{
			Description:     pulumi.String("tf-example-description"),
			DcRouterId:      pulumi.Any(vkcs_dc_router.Dc_router.Id),
			BgpRouterId:     pulumi.String("192.168.1.2"),
			Asn:             pulumi.Float64(12345),
			EcmpEnabled:     pulumi.Bool(true),
			GracefulRestart: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vkcs = Pulumi.Vkcs;

return await Deployment.RunAsync(() => 
{
    var dcBgpInstance = new Vkcs.DcBgpInstance("dcBgpInstance", new()
    {
        Description = "tf-example-description",
        DcRouterId = vkcs_dc_router.Dc_router.Id,
        BgpRouterId = "192.168.1.2",
        Asn = 12345,
        EcmpEnabled = true,
        GracefulRestart = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.DcBgpInstance;
import com.pulumi.vkcs.DcBgpInstanceArgs;
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 dcBgpInstance = new DcBgpInstance("dcBgpInstance", DcBgpInstanceArgs.builder()
            .description("tf-example-description")
            .dcRouterId(vkcs_dc_router.dc_router().id())
            .bgpRouterId("192.168.1.2")
            .asn(12345)
            .ecmpEnabled(true)
            .gracefulRestart(true)
            .build());

    }
}
Copy
resources:
  dcBgpInstance:
    type: vkcs:DcBgpInstance
    properties:
      description: tf-example-description
      dcRouterId: ${vkcs_dc_router.dc_router.id}
      bgpRouterId: 192.168.1.2
      asn: 12345
      ecmpEnabled: true
      gracefulRestart: true
Copy

Create DcBgpInstance Resource

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

Constructor syntax

new DcBgpInstance(name: string, args: DcBgpInstanceArgs, opts?: CustomResourceOptions);
@overload
def DcBgpInstance(resource_name: str,
                  args: DcBgpInstanceArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def DcBgpInstance(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  asn: Optional[float] = None,
                  bgp_router_id: Optional[str] = None,
                  dc_router_id: Optional[str] = None,
                  description: Optional[str] = None,
                  ecmp_enabled: Optional[bool] = None,
                  enabled: Optional[bool] = None,
                  graceful_restart: Optional[bool] = None,
                  long_lived_graceful_restart: Optional[bool] = None,
                  name: Optional[str] = None,
                  region: Optional[str] = None)
func NewDcBgpInstance(ctx *Context, name string, args DcBgpInstanceArgs, opts ...ResourceOption) (*DcBgpInstance, error)
public DcBgpInstance(string name, DcBgpInstanceArgs args, CustomResourceOptions? opts = null)
public DcBgpInstance(String name, DcBgpInstanceArgs args)
public DcBgpInstance(String name, DcBgpInstanceArgs args, CustomResourceOptions options)
type: vkcs:DcBgpInstance
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DcBgpInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DcBgpInstanceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DcBgpInstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DcBgpInstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DcBgpInstanceArgs
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 dcBgpInstanceResource = new Vkcs.DcBgpInstance("dcBgpInstanceResource", new()
{
    Asn = 0,
    BgpRouterId = "string",
    DcRouterId = "string",
    Description = "string",
    EcmpEnabled = false,
    Enabled = false,
    GracefulRestart = false,
    LongLivedGracefulRestart = false,
    Name = "string",
    Region = "string",
});
Copy
example, err := vkcs.NewDcBgpInstance(ctx, "dcBgpInstanceResource", &vkcs.DcBgpInstanceArgs{
Asn: pulumi.Float64(0),
BgpRouterId: pulumi.String("string"),
DcRouterId: pulumi.String("string"),
Description: pulumi.String("string"),
EcmpEnabled: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
GracefulRestart: pulumi.Bool(false),
LongLivedGracefulRestart: pulumi.Bool(false),
Name: pulumi.String("string"),
Region: pulumi.String("string"),
})
Copy
var dcBgpInstanceResource = new DcBgpInstance("dcBgpInstanceResource", DcBgpInstanceArgs.builder()
    .asn(0)
    .bgpRouterId("string")
    .dcRouterId("string")
    .description("string")
    .ecmpEnabled(false)
    .enabled(false)
    .gracefulRestart(false)
    .longLivedGracefulRestart(false)
    .name("string")
    .region("string")
    .build());
Copy
dc_bgp_instance_resource = vkcs.DcBgpInstance("dcBgpInstanceResource",
    asn=0,
    bgp_router_id="string",
    dc_router_id="string",
    description="string",
    ecmp_enabled=False,
    enabled=False,
    graceful_restart=False,
    long_lived_graceful_restart=False,
    name="string",
    region="string")
Copy
const dcBgpInstanceResource = new vkcs.DcBgpInstance("dcBgpInstanceResource", {
    asn: 0,
    bgpRouterId: "string",
    dcRouterId: "string",
    description: "string",
    ecmpEnabled: false,
    enabled: false,
    gracefulRestart: false,
    longLivedGracefulRestart: false,
    name: "string",
    region: "string",
});
Copy
type: vkcs:DcBgpInstance
properties:
    asn: 0
    bgpRouterId: string
    dcRouterId: string
    description: string
    ecmpEnabled: false
    enabled: false
    gracefulRestart: false
    longLivedGracefulRestart: false
    name: string
    region: string
Copy

DcBgpInstance Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DcBgpInstance resource accepts the following input properties:

Asn This property is required. double
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
BgpRouterId This property is required. string
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
DcRouterId This property is required. string
required string → Direct Connect Router ID to attach. Changing this creates a new resource
Description string
optional string → Description of the router
EcmpEnabled bool
optional boolean → Enable BGP ECMP behaviour on router. Default is false
Enabled bool
optional boolean → Enable or disable item. Default is true
GracefulRestart bool
optional boolean → Enable BGP Graceful Restart feature. Default is false
LongLivedGracefulRestart bool
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
Name string
optional string → Name of the router
Region string
optional string → The region to fetch availability zones from, defaults to the provider's region.
Asn This property is required. float64
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
BgpRouterId This property is required. string
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
DcRouterId This property is required. string
required string → Direct Connect Router ID to attach. Changing this creates a new resource
Description string
optional string → Description of the router
EcmpEnabled bool
optional boolean → Enable BGP ECMP behaviour on router. Default is false
Enabled bool
optional boolean → Enable or disable item. Default is true
GracefulRestart bool
optional boolean → Enable BGP Graceful Restart feature. Default is false
LongLivedGracefulRestart bool
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
Name string
optional string → Name of the router
Region string
optional string → The region to fetch availability zones from, defaults to the provider's region.
asn This property is required. Double
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
bgpRouterId This property is required. String
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
dcRouterId This property is required. String
required string → Direct Connect Router ID to attach. Changing this creates a new resource
description String
optional string → Description of the router
ecmpEnabled Boolean
optional boolean → Enable BGP ECMP behaviour on router. Default is false
enabled Boolean
optional boolean → Enable or disable item. Default is true
gracefulRestart Boolean
optional boolean → Enable BGP Graceful Restart feature. Default is false
longLivedGracefulRestart Boolean
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
name String
optional string → Name of the router
region String
optional string → The region to fetch availability zones from, defaults to the provider's region.
asn This property is required. number
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
bgpRouterId This property is required. string
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
dcRouterId This property is required. string
required string → Direct Connect Router ID to attach. Changing this creates a new resource
description string
optional string → Description of the router
ecmpEnabled boolean
optional boolean → Enable BGP ECMP behaviour on router. Default is false
enabled boolean
optional boolean → Enable or disable item. Default is true
gracefulRestart boolean
optional boolean → Enable BGP Graceful Restart feature. Default is false
longLivedGracefulRestart boolean
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
name string
optional string → Name of the router
region string
optional string → The region to fetch availability zones from, defaults to the provider's region.
asn This property is required. float
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
bgp_router_id This property is required. str
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
dc_router_id This property is required. str
required string → Direct Connect Router ID to attach. Changing this creates a new resource
description str
optional string → Description of the router
ecmp_enabled bool
optional boolean → Enable BGP ECMP behaviour on router. Default is false
enabled bool
optional boolean → Enable or disable item. Default is true
graceful_restart bool
optional boolean → Enable BGP Graceful Restart feature. Default is false
long_lived_graceful_restart bool
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
name str
optional string → Name of the router
region str
optional string → The region to fetch availability zones from, defaults to the provider's region.
asn This property is required. Number
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
bgpRouterId This property is required. String
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
dcRouterId This property is required. String
required string → Direct Connect Router ID to attach. Changing this creates a new resource
description String
optional string → Description of the router
ecmpEnabled Boolean
optional boolean → Enable BGP ECMP behaviour on router. Default is false
enabled Boolean
optional boolean → Enable or disable item. Default is true
gracefulRestart Boolean
optional boolean → Enable BGP Graceful Restart feature. Default is false
longLivedGracefulRestart Boolean
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
name String
optional string → Name of the router
region String
optional string → The region to fetch availability zones from, defaults to the provider's region.

Outputs

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

CreatedAt string
string → Creation timestamp
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
string → Update timestamp
CreatedAt string
string → Creation timestamp
Id string
The provider-assigned unique ID for this managed resource.
UpdatedAt string
string → Update timestamp
createdAt String
string → Creation timestamp
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
string → Update timestamp
createdAt string
string → Creation timestamp
id string
The provider-assigned unique ID for this managed resource.
updatedAt string
string → Update timestamp
created_at str
string → Creation timestamp
id str
The provider-assigned unique ID for this managed resource.
updated_at str
string → Update timestamp
createdAt String
string → Creation timestamp
id String
The provider-assigned unique ID for this managed resource.
updatedAt String
string → Update timestamp

Look up Existing DcBgpInstance Resource

Get an existing DcBgpInstance 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?: DcBgpInstanceState, opts?: CustomResourceOptions): DcBgpInstance
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        asn: Optional[float] = None,
        bgp_router_id: Optional[str] = None,
        created_at: Optional[str] = None,
        dc_router_id: Optional[str] = None,
        description: Optional[str] = None,
        ecmp_enabled: Optional[bool] = None,
        enabled: Optional[bool] = None,
        graceful_restart: Optional[bool] = None,
        long_lived_graceful_restart: Optional[bool] = None,
        name: Optional[str] = None,
        region: Optional[str] = None,
        updated_at: Optional[str] = None) -> DcBgpInstance
func GetDcBgpInstance(ctx *Context, name string, id IDInput, state *DcBgpInstanceState, opts ...ResourceOption) (*DcBgpInstance, error)
public static DcBgpInstance Get(string name, Input<string> id, DcBgpInstanceState? state, CustomResourceOptions? opts = null)
public static DcBgpInstance get(String name, Output<String> id, DcBgpInstanceState state, CustomResourceOptions options)
resources:  _:    type: vkcs:DcBgpInstance    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Asn double
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
BgpRouterId string
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
CreatedAt string
string → Creation timestamp
DcRouterId string
required string → Direct Connect Router ID to attach. Changing this creates a new resource
Description string
optional string → Description of the router
EcmpEnabled bool
optional boolean → Enable BGP ECMP behaviour on router. Default is false
Enabled bool
optional boolean → Enable or disable item. Default is true
GracefulRestart bool
optional boolean → Enable BGP Graceful Restart feature. Default is false
LongLivedGracefulRestart bool
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
Name string
optional string → Name of the router
Region string
optional string → The region to fetch availability zones from, defaults to the provider's region.
UpdatedAt string
string → Update timestamp
Asn float64
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
BgpRouterId string
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
CreatedAt string
string → Creation timestamp
DcRouterId string
required string → Direct Connect Router ID to attach. Changing this creates a new resource
Description string
optional string → Description of the router
EcmpEnabled bool
optional boolean → Enable BGP ECMP behaviour on router. Default is false
Enabled bool
optional boolean → Enable or disable item. Default is true
GracefulRestart bool
optional boolean → Enable BGP Graceful Restart feature. Default is false
LongLivedGracefulRestart bool
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
Name string
optional string → Name of the router
Region string
optional string → The region to fetch availability zones from, defaults to the provider's region.
UpdatedAt string
string → Update timestamp
asn Double
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
bgpRouterId String
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
createdAt String
string → Creation timestamp
dcRouterId String
required string → Direct Connect Router ID to attach. Changing this creates a new resource
description String
optional string → Description of the router
ecmpEnabled Boolean
optional boolean → Enable BGP ECMP behaviour on router. Default is false
enabled Boolean
optional boolean → Enable or disable item. Default is true
gracefulRestart Boolean
optional boolean → Enable BGP Graceful Restart feature. Default is false
longLivedGracefulRestart Boolean
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
name String
optional string → Name of the router
region String
optional string → The region to fetch availability zones from, defaults to the provider's region.
updatedAt String
string → Update timestamp
asn number
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
bgpRouterId string
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
createdAt string
string → Creation timestamp
dcRouterId string
required string → Direct Connect Router ID to attach. Changing this creates a new resource
description string
optional string → Description of the router
ecmpEnabled boolean
optional boolean → Enable BGP ECMP behaviour on router. Default is false
enabled boolean
optional boolean → Enable or disable item. Default is true
gracefulRestart boolean
optional boolean → Enable BGP Graceful Restart feature. Default is false
longLivedGracefulRestart boolean
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
name string
optional string → Name of the router
region string
optional string → The region to fetch availability zones from, defaults to the provider's region.
updatedAt string
string → Update timestamp
asn float
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
bgp_router_id str
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
created_at str
string → Creation timestamp
dc_router_id str
required string → Direct Connect Router ID to attach. Changing this creates a new resource
description str
optional string → Description of the router
ecmp_enabled bool
optional boolean → Enable BGP ECMP behaviour on router. Default is false
enabled bool
optional boolean → Enable or disable item. Default is true
graceful_restart bool
optional boolean → Enable BGP Graceful Restart feature. Default is false
long_lived_graceful_restart bool
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
name str
optional string → Name of the router
region str
optional string → The region to fetch availability zones from, defaults to the provider's region.
updated_at str
string → Update timestamp
asn Number
required number → BGP Autonomous System Number (integer representation supports only). Changing this creates a new resource
bgpRouterId String
required string → BGP Router ID (IP address that represent BGP router in BGP network). Changing this creates a new resource
createdAt String
string → Creation timestamp
dcRouterId String
required string → Direct Connect Router ID to attach. Changing this creates a new resource
description String
optional string → Description of the router
ecmpEnabled Boolean
optional boolean → Enable BGP ECMP behaviour on router. Default is false
enabled Boolean
optional boolean → Enable or disable item. Default is true
gracefulRestart Boolean
optional boolean → Enable BGP Graceful Restart feature. Default is false
longLivedGracefulRestart Boolean
optional boolean → Enable BGP Long Lived Graceful Restart feature. Default is false
name String
optional string → Name of the router
region String
optional string → The region to fetch availability zones from, defaults to the provider's region.
updatedAt String
string → Update timestamp

Import

Direct connect BGP instance can be imported using the id, e.g.

$ pulumi import vkcs:index/dcBgpInstance:DcBgpInstance mydcbgpinstance e73496b2-e476-4536-9167-af24d18e1486
Copy

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

Package Details

Repository
vkcs vk-cs/terraform-provider-vkcs
License
Notes
This Pulumi package is based on the vkcs Terraform Provider.