1. Packages
  2. Openstack Provider
  3. API Docs
  4. networking
  5. BgpPeerV2
OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi

openstack.networking.BgpPeerV2

Explore with Pulumi AI

openstack logo
OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi

    Manages a V2 Neutron BGP Peer resource within OpenStack.

    This resource allows you to configure a BGP peer that can be associated with a BGP speaker to exchange routing information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const peer1 = new openstack.networking.BgpPeerV2("peer_1", {
        name: "bgp_peer_1",
        peerIp: "192.0.2.10",
        remoteAs: 65001,
        authType: "md5",
        password: "supersecret",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    peer1 = openstack.networking.BgpPeerV2("peer_1",
        name="bgp_peer_1",
        peer_ip="192.0.2.10",
        remote_as=65001,
        auth_type="md5",
        password="supersecret")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networking.NewBgpPeerV2(ctx, "peer_1", &networking.BgpPeerV2Args{
    			Name:     pulumi.String("bgp_peer_1"),
    			PeerIp:   pulumi.String("192.0.2.10"),
    			RemoteAs: pulumi.Int(65001),
    			AuthType: pulumi.String("md5"),
    			Password: pulumi.String("supersecret"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var peer1 = new OpenStack.Networking.BgpPeerV2("peer_1", new()
        {
            Name = "bgp_peer_1",
            PeerIp = "192.0.2.10",
            RemoteAs = 65001,
            AuthType = "md5",
            Password = "supersecret",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.networking.BgpPeerV2;
    import com.pulumi.openstack.networking.BgpPeerV2Args;
    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 peer1 = new BgpPeerV2("peer1", BgpPeerV2Args.builder()
                .name("bgp_peer_1")
                .peerIp("192.0.2.10")
                .remoteAs(65001)
                .authType("md5")
                .password("supersecret")
                .build());
    
        }
    }
    
    resources:
      peer1:
        type: openstack:networking:BgpPeerV2
        name: peer_1
        properties:
          name: bgp_peer_1
          peerIp: 192.0.2.10
          remoteAs: 65001
          authType: md5
          password: supersecret
    

    Create BgpPeerV2 Resource

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

    Constructor syntax

    new BgpPeerV2(name: string, args: BgpPeerV2Args, opts?: CustomResourceOptions);
    @overload
    def BgpPeerV2(resource_name: str,
                  args: BgpPeerV2Args,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def BgpPeerV2(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  peer_ip: Optional[str] = None,
                  remote_as: Optional[int] = None,
                  auth_type: Optional[str] = None,
                  name: Optional[str] = None,
                  password: Optional[str] = None,
                  region: Optional[str] = None,
                  tenant_id: Optional[str] = None)
    func NewBgpPeerV2(ctx *Context, name string, args BgpPeerV2Args, opts ...ResourceOption) (*BgpPeerV2, error)
    public BgpPeerV2(string name, BgpPeerV2Args args, CustomResourceOptions? opts = null)
    public BgpPeerV2(String name, BgpPeerV2Args args)
    public BgpPeerV2(String name, BgpPeerV2Args args, CustomResourceOptions options)
    
    type: openstack:networking:BgpPeerV2
    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 BgpPeerV2Args
    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 BgpPeerV2Args
    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 BgpPeerV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BgpPeerV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BgpPeerV2Args
    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 bgpPeerV2Resource = new OpenStack.Networking.BgpPeerV2("bgpPeerV2Resource", new()
    {
        PeerIp = "string",
        RemoteAs = 0,
        AuthType = "string",
        Name = "string",
        Password = "string",
        Region = "string",
        TenantId = "string",
    });
    
    example, err := networking.NewBgpPeerV2(ctx, "bgpPeerV2Resource", &networking.BgpPeerV2Args{
    	PeerIp:   pulumi.String("string"),
    	RemoteAs: pulumi.Int(0),
    	AuthType: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	Password: pulumi.String("string"),
    	Region:   pulumi.String("string"),
    	TenantId: pulumi.String("string"),
    })
    
    var bgpPeerV2Resource = new BgpPeerV2("bgpPeerV2Resource", BgpPeerV2Args.builder()
        .peerIp("string")
        .remoteAs(0)
        .authType("string")
        .name("string")
        .password("string")
        .region("string")
        .tenantId("string")
        .build());
    
    bgp_peer_v2_resource = openstack.networking.BgpPeerV2("bgpPeerV2Resource",
        peer_ip="string",
        remote_as=0,
        auth_type="string",
        name="string",
        password="string",
        region="string",
        tenant_id="string")
    
    const bgpPeerV2Resource = new openstack.networking.BgpPeerV2("bgpPeerV2Resource", {
        peerIp: "string",
        remoteAs: 0,
        authType: "string",
        name: "string",
        password: "string",
        region: "string",
        tenantId: "string",
    });
    
    type: openstack:networking:BgpPeerV2
    properties:
        authType: string
        name: string
        password: string
        peerIp: string
        region: string
        remoteAs: 0
        tenantId: string
    

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

    PeerIp string
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    RemoteAs int
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    AuthType string
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    Name string
    A name for the BGP peer.
    Password string
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    TenantId string
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.
    PeerIp string
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    RemoteAs int
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    AuthType string
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    Name string
    A name for the BGP peer.
    Password string
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    TenantId string
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.
    peerIp String
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    remoteAs Integer
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    authType String
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    name String
    A name for the BGP peer.
    password String
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    tenantId String
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.
    peerIp string
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    remoteAs number
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    authType string
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    name string
    A name for the BGP peer.
    password string
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    tenantId string
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.
    peer_ip str
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    remote_as int
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    auth_type str
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    name str
    A name for the BGP peer.
    password str
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    region str
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    tenant_id str
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.
    peerIp String
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    remoteAs Number
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    authType String
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    name String
    A name for the BGP peer.
    password String
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    tenantId String
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BgpPeerV2 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 BgpPeerV2 Resource

    Get an existing BgpPeerV2 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?: BgpPeerV2State, opts?: CustomResourceOptions): BgpPeerV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            auth_type: Optional[str] = None,
            name: Optional[str] = None,
            password: Optional[str] = None,
            peer_ip: Optional[str] = None,
            region: Optional[str] = None,
            remote_as: Optional[int] = None,
            tenant_id: Optional[str] = None) -> BgpPeerV2
    func GetBgpPeerV2(ctx *Context, name string, id IDInput, state *BgpPeerV2State, opts ...ResourceOption) (*BgpPeerV2, error)
    public static BgpPeerV2 Get(string name, Input<string> id, BgpPeerV2State? state, CustomResourceOptions? opts = null)
    public static BgpPeerV2 get(String name, Output<String> id, BgpPeerV2State state, CustomResourceOptions options)
    resources:  _:    type: openstack:networking:BgpPeerV2    get:      id: ${id}
    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:
    AuthType string
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    Name string
    A name for the BGP peer.
    Password string
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    PeerIp string
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    RemoteAs int
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    TenantId string
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.
    AuthType string
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    Name string
    A name for the BGP peer.
    Password string
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    PeerIp string
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    Region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    RemoteAs int
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    TenantId string
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.
    authType String
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    name String
    A name for the BGP peer.
    password String
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    peerIp String
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    remoteAs Integer
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    tenantId String
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.
    authType string
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    name string
    A name for the BGP peer.
    password string
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    peerIp string
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    region string
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    remoteAs number
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    tenantId string
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.
    auth_type str
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    name str
    A name for the BGP peer.
    password str
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    peer_ip str
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    region str
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    remote_as int
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    tenant_id str
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.
    authType String
    The authentication type to use. Can be one of none or md5. Defaults to none. If set to not none, the password argument must also be provided. Changing this creates a new BGP peer.
    name String
    A name for the BGP peer.
    password String
    The password used for MD5 authentication. Must be set only when auth_type is not none.
    peerIp String
    The IP address of the BGP peer. Must be a valid IP address. Changing this creates a new BGP peer.
    region String
    The region in which to obtain the V2 Networking client. A Networking client is needed to create a Neutron network. If omitted, the region argument of the provider is used. Changing this creates a new BGP peer.
    remoteAs Number
    The AS number of the BGP peer. Changing this creates a new BGP peer.
    tenantId String
    The tenant/project ID. Required if admin privileges are used. Changing this creates a new BGP peer.

    Import

    BGP peers can be imported using their ID:

    $ pulumi import openstack:networking/bgpPeerV2:BgpPeerV2 peer1 a1b2c3d4-e5f6-7890-abcd-1234567890ef
    

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

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi