Alibaba Cloud
BgpNetwork
Provides a VPC Bgp Network resource.
For information about VPC Bgp Network and how to use it, see What is Bgp Network.
NOTE: Available in v1.153.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var defaultPhysicalConnections = Output.Create(AliCloud.ExpressConnect.GetPhysicalConnections.InvokeAsync());
var defaultVirtualBorderRouter = new AliCloud.ExpressConnect.VirtualBorderRouter("defaultVirtualBorderRouter", new AliCloud.ExpressConnect.VirtualBorderRouterArgs
{
LocalGatewayIp = "10.0.0.1",
PeerGatewayIp = "10.0.0.2",
PeeringSubnetMask = "255.255.255.252",
PhysicalConnectionId = defaultPhysicalConnections.Apply(defaultPhysicalConnections => defaultPhysicalConnections.Connections?[0]?.Id),
VirtualBorderRouterName = @var.Name,
VlanId = 120,
MinRxInterval = 1000,
MinTxInterval = 1000,
DetectMultiplier = 10,
});
var example = new AliCloud.Vpc.BgpNetwork("example", new AliCloud.Vpc.BgpNetworkArgs
{
DstCidrBlock = "example_value",
RouterId = defaultVirtualBorderRouter.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 {
defaultPhysicalConnections, err := expressconnect.GetPhysicalConnections(ctx, nil, nil)
if err != nil {
return err
}
defaultVirtualBorderRouter, err := expressconnect.NewVirtualBorderRouter(ctx, "defaultVirtualBorderRouter", &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(defaultPhysicalConnections.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.NewBgpNetwork(ctx, "example", &vpc.BgpNetworkArgs{
DstCidrBlock: pulumi.String("example_value"),
RouterId: defaultVirtualBorderRouter.ID(),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
default_physical_connections = alicloud.expressconnect.get_physical_connections()
default_virtual_border_router = alicloud.expressconnect.VirtualBorderRouter("defaultVirtualBorderRouter",
local_gateway_ip="10.0.0.1",
peer_gateway_ip="10.0.0.2",
peering_subnet_mask="255.255.255.252",
physical_connection_id=default_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)
example = alicloud.vpc.BgpNetwork("example",
dst_cidr_block="example_value",
router_id=default_virtual_border_router.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultPhysicalConnections = alicloud.expressconnect.getPhysicalConnections({});
const defaultVirtualBorderRouter = new alicloud.expressconnect.VirtualBorderRouter("defaultVirtualBorderRouter", {
localGatewayIp: "10.0.0.1",
peerGatewayIp: "10.0.0.2",
peeringSubnetMask: "255.255.255.252",
physicalConnectionId: defaultPhysicalConnections.then(defaultPhysicalConnections => defaultPhysicalConnections.connections?[0]?.id),
virtualBorderRouterName: _var.name,
vlanId: 120,
minRxInterval: 1000,
minTxInterval: 1000,
detectMultiplier: 10,
});
const example = new alicloud.vpc.BgpNetwork("example", {
dstCidrBlock: "example_value",
routerId: defaultVirtualBorderRouter.id,
});
Coming soon!
Create a BgpNetwork Resource
new BgpNetwork(name: string, args: BgpNetworkArgs, opts?: CustomResourceOptions);
@overload
def BgpNetwork(resource_name: str,
opts: Optional[ResourceOptions] = None,
dst_cidr_block: Optional[str] = None,
router_id: Optional[str] = None)
@overload
def BgpNetwork(resource_name: str,
args: BgpNetworkArgs,
opts: Optional[ResourceOptions] = None)
func NewBgpNetwork(ctx *Context, name string, args BgpNetworkArgs, opts ...ResourceOption) (*BgpNetwork, error)
public BgpNetwork(string name, BgpNetworkArgs args, CustomResourceOptions? opts = null)
public BgpNetwork(String name, BgpNetworkArgs args)
public BgpNetwork(String name, BgpNetworkArgs args, CustomResourceOptions options)
type: alicloud:vpc:BgpNetwork
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BgpNetworkArgs
- 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 BgpNetworkArgs
- 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 BgpNetworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BgpNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BgpNetworkArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BgpNetwork 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 BgpNetwork resource accepts the following input properties:
- Dst
Cidr stringBlock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- Router
Id string The ID of the vRouter associated with the router interface.
- Dst
Cidr stringBlock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- Router
Id string The ID of the vRouter associated with the router interface.
- dst
Cidr StringBlock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- router
Id String The ID of the vRouter associated with the router interface.
- dst
Cidr stringBlock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- router
Id string The ID of the vRouter associated with the router interface.
- dst_
cidr_ strblock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- router_
id str The ID of the vRouter associated with the router interface.
- dst
Cidr StringBlock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- router
Id String The ID of the vRouter associated with the router interface.
Outputs
All input properties are implicitly available as output properties. Additionally, the BgpNetwork resource produces the following output properties:
Look up an Existing BgpNetwork Resource
Get an existing BgpNetwork 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?: BgpNetworkState, opts?: CustomResourceOptions): BgpNetwork
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
dst_cidr_block: Optional[str] = None,
router_id: Optional[str] = None,
status: Optional[str] = None) -> BgpNetwork
func GetBgpNetwork(ctx *Context, name string, id IDInput, state *BgpNetworkState, opts ...ResourceOption) (*BgpNetwork, error)
public static BgpNetwork Get(string name, Input<string> id, BgpNetworkState? state, CustomResourceOptions? opts = null)
public static BgpNetwork get(String name, Output<String> id, BgpNetworkState 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.
- Dst
Cidr stringBlock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- Router
Id string The ID of the vRouter associated with the router interface.
- Status string
The state of the advertised BGP network.
- Dst
Cidr stringBlock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- Router
Id string The ID of the vRouter associated with the router interface.
- Status string
The state of the advertised BGP network.
- dst
Cidr StringBlock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- router
Id String The ID of the vRouter associated with the router interface.
- status String
The state of the advertised BGP network.
- dst
Cidr stringBlock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- router
Id string The ID of the vRouter associated with the router interface.
- status string
The state of the advertised BGP network.
- dst_
cidr_ strblock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- router_
id str The ID of the vRouter associated with the router interface.
- status str
The state of the advertised BGP network.
- dst
Cidr StringBlock The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.
- router
Id String The ID of the vRouter associated with the router interface.
- status String
The state of the advertised BGP network.
Import
VPC Bgp Network can be imported using the id, e.g.
$ pulumi import alicloud:vpc/bgpNetwork:BgpNetwork example <router_id>:<dst_cidr_block>
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.