nxos.BgpPeer
Explore with Pulumi AI
This resource can manage the BGP peer configuration.
- API Documentation: bgpPeer
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nxos = Lbrlabs.PulumiPackage.Nxos;
return await Deployment.RunAsync(() =>
{
var example = new Nxos.BgpPeer("example", new()
{
Address = "192.168.0.1",
Asn = "65001",
Description = "My description",
HoldTime = 45,
Keepalive = 15,
PeerTemplate = "SPINE-PEERS",
PeerType = "fabric-internal",
RemoteAsn = "65002",
SourceInterface = "lo0",
Vrf = "default",
});
});
package main
import (
"github.com/lbrlabs/pulumi-nxos/sdk/go/nxos"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nxos.NewBgpPeer(ctx, "example", &nxos.BgpPeerArgs{
Address: pulumi.String("192.168.0.1"),
Asn: pulumi.String("65001"),
Description: pulumi.String("My description"),
HoldTime: pulumi.Int(45),
Keepalive: pulumi.Int(15),
PeerTemplate: pulumi.String("SPINE-PEERS"),
PeerType: pulumi.String("fabric-internal"),
RemoteAsn: pulumi.String("65002"),
SourceInterface: pulumi.String("lo0"),
Vrf: pulumi.String("default"),
})
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.nxos.BgpPeer;
import com.pulumi.nxos.BgpPeerArgs;
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 BgpPeer("example", BgpPeerArgs.builder()
.address("192.168.0.1")
.asn("65001")
.description("My description")
.holdTime(45)
.keepalive(15)
.peerTemplate("SPINE-PEERS")
.peerType("fabric-internal")
.remoteAsn("65002")
.sourceInterface("lo0")
.vrf("default")
.build());
}
}
import pulumi
import lbrlabs_pulumi_nxos as nxos
example = nxos.BgpPeer("example",
address="192.168.0.1",
asn="65001",
description="My description",
hold_time=45,
keepalive=15,
peer_template="SPINE-PEERS",
peer_type="fabric-internal",
remote_asn="65002",
source_interface="lo0",
vrf="default")
import * as pulumi from "@pulumi/pulumi";
import * as nxos from "@lbrlabs/pulumi-nxos";
const example = new nxos.BgpPeer("example", {
address: "192.168.0.1",
asn: "65001",
description: "My description",
holdTime: 45,
keepalive: 15,
peerTemplate: "SPINE-PEERS",
peerType: "fabric-internal",
remoteAsn: "65002",
sourceInterface: "lo0",
vrf: "default",
});
resources:
example:
type: nxos:BgpPeer
properties:
address: 192.168.0.1
asn: '65001'
description: My description
holdTime: 45
keepalive: 15
peerTemplate: SPINE-PEERS
peerType: fabric-internal
remoteAsn: '65002'
sourceInterface: lo0
vrf: default
Create BgpPeer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BgpPeer(name: string, args: BgpPeerArgs, opts?: CustomResourceOptions);
@overload
def BgpPeer(resource_name: str,
args: BgpPeerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def BgpPeer(resource_name: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
asn: Optional[str] = None,
vrf: Optional[str] = None,
description: Optional[str] = None,
device: Optional[str] = None,
hold_time: Optional[int] = None,
keepalive: Optional[int] = None,
peer_template: Optional[str] = None,
peer_type: Optional[str] = None,
remote_asn: Optional[str] = None,
source_interface: Optional[str] = None)
func NewBgpPeer(ctx *Context, name string, args BgpPeerArgs, opts ...ResourceOption) (*BgpPeer, error)
public BgpPeer(string name, BgpPeerArgs args, CustomResourceOptions? opts = null)
public BgpPeer(String name, BgpPeerArgs args)
public BgpPeer(String name, BgpPeerArgs args, CustomResourceOptions options)
type: nxos:BgpPeer
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 BgpPeerArgs
- 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 BgpPeerArgs
- 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 BgpPeerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BgpPeerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BgpPeerArgs
- 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 bgpPeerResource = new Nxos.BgpPeer("bgpPeerResource", new()
{
Address = "string",
Asn = "string",
Vrf = "string",
Description = "string",
Device = "string",
HoldTime = 0,
Keepalive = 0,
PeerTemplate = "string",
PeerType = "string",
RemoteAsn = "string",
SourceInterface = "string",
});
example, err := nxos.NewBgpPeer(ctx, "bgpPeerResource", &nxos.BgpPeerArgs{
Address: pulumi.String("string"),
Asn: pulumi.String("string"),
Vrf: pulumi.String("string"),
Description: pulumi.String("string"),
Device: pulumi.String("string"),
HoldTime: pulumi.Int(0),
Keepalive: pulumi.Int(0),
PeerTemplate: pulumi.String("string"),
PeerType: pulumi.String("string"),
RemoteAsn: pulumi.String("string"),
SourceInterface: pulumi.String("string"),
})
var bgpPeerResource = new BgpPeer("bgpPeerResource", BgpPeerArgs.builder()
.address("string")
.asn("string")
.vrf("string")
.description("string")
.device("string")
.holdTime(0)
.keepalive(0)
.peerTemplate("string")
.peerType("string")
.remoteAsn("string")
.sourceInterface("string")
.build());
bgp_peer_resource = nxos.BgpPeer("bgpPeerResource",
address="string",
asn="string",
vrf="string",
description="string",
device="string",
hold_time=0,
keepalive=0,
peer_template="string",
peer_type="string",
remote_asn="string",
source_interface="string")
const bgpPeerResource = new nxos.BgpPeer("bgpPeerResource", {
address: "string",
asn: "string",
vrf: "string",
description: "string",
device: "string",
holdTime: 0,
keepalive: 0,
peerTemplate: "string",
peerType: "string",
remoteAsn: "string",
sourceInterface: "string",
});
type: nxos:BgpPeer
properties:
address: string
asn: string
description: string
device: string
holdTime: 0
keepalive: 0
peerTemplate: string
peerType: string
remoteAsn: string
sourceInterface: string
vrf: string
BgpPeer 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 BgpPeer resource accepts the following input properties:
- Address string
- Peer address.
- Asn string
- Autonomous system number.
- Vrf string
- VRF name.
- Description string
- Peer description.
- Device string
- A device name from the provider configuration.
- Hold
Time int - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- Keepalive int
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- Peer
Template string - Peer template name.
- Peer
Type string - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- Remote
Asn string - Peer autonomous system number.
- Source
Interface string - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- Address string
- Peer address.
- Asn string
- Autonomous system number.
- Vrf string
- VRF name.
- Description string
- Peer description.
- Device string
- A device name from the provider configuration.
- Hold
Time int - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- Keepalive int
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- Peer
Template string - Peer template name.
- Peer
Type string - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- Remote
Asn string - Peer autonomous system number.
- Source
Interface string - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- address String
- Peer address.
- asn String
- Autonomous system number.
- vrf String
- VRF name.
- description String
- Peer description.
- device String
- A device name from the provider configuration.
- hold
Time Integer - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- keepalive Integer
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- peer
Template String - Peer template name.
- peer
Type String - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- remote
Asn String - Peer autonomous system number.
- source
Interface String - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- address string
- Peer address.
- asn string
- Autonomous system number.
- vrf string
- VRF name.
- description string
- Peer description.
- device string
- A device name from the provider configuration.
- hold
Time number - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- keepalive number
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- peer
Template string - Peer template name.
- peer
Type string - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- remote
Asn string - Peer autonomous system number.
- source
Interface string - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- address str
- Peer address.
- asn str
- Autonomous system number.
- vrf str
- VRF name.
- description str
- Peer description.
- device str
- A device name from the provider configuration.
- hold_
time int - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- keepalive int
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- peer_
template str - Peer template name.
- peer_
type str - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- remote_
asn str - Peer autonomous system number.
- source_
interface str - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- address String
- Peer address.
- asn String
- Autonomous system number.
- vrf String
- VRF name.
- description String
- Peer description.
- device String
- A device name from the provider configuration.
- hold
Time Number - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- keepalive Number
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- peer
Template String - Peer template name.
- peer
Type String - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- remote
Asn String - Peer autonomous system number.
- source
Interface String - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
Outputs
All input properties are implicitly available as output properties. Additionally, the BgpPeer 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 BgpPeer Resource
Get an existing BgpPeer 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?: BgpPeerState, opts?: CustomResourceOptions): BgpPeer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
address: Optional[str] = None,
asn: Optional[str] = None,
description: Optional[str] = None,
device: Optional[str] = None,
hold_time: Optional[int] = None,
keepalive: Optional[int] = None,
peer_template: Optional[str] = None,
peer_type: Optional[str] = None,
remote_asn: Optional[str] = None,
source_interface: Optional[str] = None,
vrf: Optional[str] = None) -> BgpPeer
func GetBgpPeer(ctx *Context, name string, id IDInput, state *BgpPeerState, opts ...ResourceOption) (*BgpPeer, error)
public static BgpPeer Get(string name, Input<string> id, BgpPeerState? state, CustomResourceOptions? opts = null)
public static BgpPeer get(String name, Output<String> id, BgpPeerState 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.
- Address string
- Peer address.
- Asn string
- Autonomous system number.
- Description string
- Peer description.
- Device string
- A device name from the provider configuration.
- Hold
Time int - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- Keepalive int
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- Peer
Template string - Peer template name.
- Peer
Type string - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- Remote
Asn string - Peer autonomous system number.
- Source
Interface string - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- Vrf string
- VRF name.
- Address string
- Peer address.
- Asn string
- Autonomous system number.
- Description string
- Peer description.
- Device string
- A device name from the provider configuration.
- Hold
Time int - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- Keepalive int
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- Peer
Template string - Peer template name.
- Peer
Type string - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- Remote
Asn string - Peer autonomous system number.
- Source
Interface string - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- Vrf string
- VRF name.
- address String
- Peer address.
- asn String
- Autonomous system number.
- description String
- Peer description.
- device String
- A device name from the provider configuration.
- hold
Time Integer - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- keepalive Integer
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- peer
Template String - Peer template name.
- peer
Type String - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- remote
Asn String - Peer autonomous system number.
- source
Interface String - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- vrf String
- VRF name.
- address string
- Peer address.
- asn string
- Autonomous system number.
- description string
- Peer description.
- device string
- A device name from the provider configuration.
- hold
Time number - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- keepalive number
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- peer
Template string - Peer template name.
- peer
Type string - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- remote
Asn string - Peer autonomous system number.
- source
Interface string - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- vrf string
- VRF name.
- address str
- Peer address.
- asn str
- Autonomous system number.
- description str
- Peer description.
- device str
- A device name from the provider configuration.
- hold_
time int - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- keepalive int
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- peer_
template str - Peer template name.
- peer_
type str - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- remote_
asn str - Peer autonomous system number.
- source_
interface str - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- vrf str
- VRF name.
- address String
- Peer address.
- asn String
- Autonomous system number.
- description String
- Peer description.
- device String
- A device name from the provider configuration.
- hold
Time Number - BGP Hold Timer in seconds. The value must be greater than the keepalive timer - Range:
3
-3600
- Default value:180
- keepalive Number
- BGP Keepalive Timer in seconds - Range:
0
-3600
- Default value:60
- peer
Template String - Peer template name.
- peer
Type String - Neighbor Fabric Type. - Choices:
fabric-internal
,fabric-external
,fabric-border-leaf
- Default value:fabric-internal
- remote
Asn String - Peer autonomous system number.
- source
Interface String - Source Interface. Must match first field in the output of
show intf brief
. - Default value:unspecified
- vrf String
- VRF name.
Import
$ pulumi import nxos:index/bgpPeer:BgpPeer example "sys/bgp/inst/dom-[default]/peer-[192.168.0.1]"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- nxos lbrlabs/pulumi-nxos
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nxos
Terraform Provider.