https://github.com/netascode/terraform-nxos-bgp
Terraform Cisco NX-OS BGP Module
https://github.com/netascode/terraform-nxos-bgp
cisco nx-os nxos terraform terraform-module
Last synced: 3 months ago
JSON representation
Terraform Cisco NX-OS BGP Module
- Host: GitHub
- URL: https://github.com/netascode/terraform-nxos-bgp
- Owner: netascode
- License: apache-2.0
- Created: 2022-04-15T16:39:00.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-10T12:05:30.000Z (over 1 year ago)
- Last Synced: 2025-01-14T14:14:06.676Z (4 months ago)
- Topics: cisco, nx-os, nxos, terraform, terraform-module
- Language: HCL
- Homepage: https://registry.terraform.io/modules/netascode/bgp/nxos
- Size: 43 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/netascode/terraform-nxos-bgp/actions/workflows/test.yml)
# Terraform NX-OS BGP Module
Manages NX-OS BGP
Model Documentation: [Link](https://developer.cisco.com/docs/cisco-nexus-3000-and-9000-series-nx-api-rest-sdk-user-guide-and-api-reference-release-9-3x/#!configuring-bgp)
## Examples
```hcl
module "nxos_bgp" {
source = "netascode/bgp/nxos"
version = ">= 0.2.0"asn = "65001"
enhanced_error_handling = false
template_peers = [
{
name = "SPINE-PEERS"
asn = "65001"
description = "Spine Peers template"
peer_type = "fabric-external"
source_interface = "lo0"
address_families = [
{
address_family = "ipv4_unicast"
send_community_standard = true
route_reflector_client = true
},
{
address_family = "l2vpn_evpn"
send_community_standard = true
send_community_extended = true
route_reflector_client = true
}
]
}
]
vrfs = [
{
vrf = "default"
router_id = "1.2.3.4"
log_neighbor_changes = true
graceful_restart_stalepath_time = 123
graceful_restart_restart_time = 123
neighbors = [
{
ip = "5.6.7.8"
description = "My description"
peer_type = "fabric-external"
asn = "65002"
source_interface = "lo2"
address_families = [
{
address_family = "ipv4_unicast"
send_community_standard = true
send_community_extended = true
route_reflector_client = false
},
{
address_family = "l2vpn_evpn"
send_community_standard = true
route_reflector_client = false
}
]
},
{
ip = "9.10.11.12"
description = "My description 2"
inherit_peer = "SPINE-PEERS"
}
]
},
{
vrf = "VRF1"
router_id = "10.20.30.40"
log_neighbor_changes = true
graceful_restart_stalepath_time = 1230
graceful_restart_restart_time = 1230
neighbors = [
{
ip = "50.60.70.80"
description = "My description"
},
{
ip = "90.100.110.120"
description = "My description 2"
}
]
}
]
}
```## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.3.0 |
| [nxos](#requirement\_nxos) | >= 0.5.0 |## Providers
| Name | Version |
|------|---------|
| [nxos](#provider\_nxos) | >= 0.5.0 |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [device](#input\_device) | A device name from the provider configuration. | `string` | `null` | no |
| [asn](#input\_asn) | BGP Autonomous system number. | `string` | n/a | yes |
| [enhanced\_error\_handling](#input\_enhanced\_error\_handling) | BGP Enhanced error handling. | `bool` | `true` | no |
| [template\_peers](#input\_template\_peers) | BGP Template Peers list.
Choices `peer_type`: `fabric-internal`, `fabric-external`, `fabric-border-leaf`. Default value `peer_type`: `fabric-internal`.
List `address_families`:
Choices `address_family`: `ipv4_unicast`, `ipv6_unicast`. |list(object({| `[]` | no |
name = string
asn = optional(string)
description = optional(string, "")
peer_type = optional(string, "fabric-internal")
source_interface = optional(string, "unspecified")
address_families = optional(list(object({
address_family = string
send_community_standard = optional(bool, false)
send_community_extended = optional(bool, false)
route_reflector_client = optional(bool, false)
})), [])
}))
| [vrfs](#input\_vrfs) | BGP VRF list.
List `neighbors`:
Allowed formats `ip`: `192.168.1.1` or `192.168.1.0/24`.
Choices `peer_type`: `fabric-internal`, `fabric-external`, `fabric-border-leaf`. Default value `peer_type`: `fabric-internal`.
List `address_families`:
Choices `address_family`: `ipv4_unicast`, `ipv6_unicast`, `l2vpn_evpn`. |list(object({| `[]` | no |
vrf = string
router_id = optional(string)
log_neighbor_changes = optional(bool, false)
graceful_restart_stalepath_time = optional(number, 300)
graceful_restart_restart_time = optional(number, 120)
neighbors = optional(list(object({
ip = string
asn = optional(string)
inherit_peer = optional(string, "")
description = optional(string, "")
peer_type = optional(string, "fabric-internal")
source_interface = optional(string, "unspecified")
address_families = optional(list(object({
address_family = string
send_community_standard = optional(bool, false)
send_community_extended = optional(bool, false)
route_reflector_client = optional(bool, false)
})))
})))
}))## Outputs
| Name | Description |
|------|-------------|
| [dn](#output\_dn) | Distinguished name of the object. |## Resources
| Name | Type |
|------|------|
| [nxos_bgp.bgpEntity](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp) | resource |
| [nxos_bgp_graceful_restart.bgpGr](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp_graceful_restart) | resource |
| [nxos_bgp_instance.bgpInst](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp_instance) | resource |
| [nxos_bgp_peer.bgpPeer](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp_peer) | resource |
| [nxos_bgp_peer_address_family.bgpPeerAf](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp_peer_address_family) | resource |
| [nxos_bgp_peer_template.bgpPeerCont](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp_peer_template) | resource |
| [nxos_bgp_peer_template_address_family.bgpPeerAf](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp_peer_template_address_family) | resource |
| [nxos_bgp_route_control.bgpRtCtrl](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp_route_control) | resource |
| [nxos_bgp_vrf.bgpDom](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp_vrf) | resource |