https://github.com/netascode/terraform-nxos-vpc
Terraform Cisco NX-OS vPC Module
https://github.com/netascode/terraform-nxos-vpc
Last synced: 3 months ago
JSON representation
Terraform Cisco NX-OS vPC Module
- Host: GitHub
- URL: https://github.com/netascode/terraform-nxos-vpc
- Owner: netascode
- License: apache-2.0
- Created: 2023-12-12T20:21:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-10T12:04:30.000Z (over 1 year ago)
- Last Synced: 2025-01-14T14:14:07.487Z (4 months ago)
- Language: HCL
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- 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-vpc/actions/workflows/test.yml)
# Terraform NX-OS vPC Module
Manages NX-OS vPC
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-virtual-port-channels/configuring-virtual-port-channels)
## Examples
```hcl
module "nxos_vpc" {
source = "netascode/vpc/nxos"
version = ">= 0.0.1"switch_1_name = "SWITCH1"
switch_2_name = "SWITCH2"
vpc_domain_id = 123
vpc_auto_recovery = true
vpc_auto_recovery_interval = 120
vpc_delay_restore_orphan_port = 10
vpc_delay_restore_svi = 20
vpc_delay_restore_vpc = 20
vpc_fast_convergence = true
vpc_graceful_consistency_check = false
vpc_l3_peer_router = true
vpc_l3_peer_router_syslog = true
vpc_l3_peer_router_syslog_interval = 1800
vpc_peer_gateway = true
vpc_role_priority_switch_1 = 10
vpc_role_priority_switch_2 = 20
vpc_sys_mac_switch_1 = "0A:0A:0A:01:01:01"
vpc_sys_mac_switch_2 = "0B:0B:0B:02:02:02"
vpc_system_priority_switch_1 = 100
vpc_system_priority_switch_2 = 200
keepalive_vrf = "management"
keepalive_ip_switch_1 = "10.122.187.114"
keepalive_ip_switch_2 = "10.122.187.115"
keepalive_flush_timeout = 5
keepalive_interval = 500
keepalive_timeout = 10
peer_link_port_channel_id = 10
peer_link_port_channel_mode = "on"
peer_link_maximum_links = 32
peer_link_minimum_links = 1
peer_link_interfaces = ["eth1/1", "eth1/2"]
virtual_port_channels = [
{
id = 100
mode = "trunk"
layer = "Layer2"
trunk_vlans = "1-20"
maximum_links = 32
minimum_links = 1
mtu = 1500
interfaces = ["eth1/20", "eth1/22"]
},
{
id = 200
mode = "access"
access_vlan = 10
layer = "Layer2"
interfaces = ["eth1/21"]
}
]
}
```## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0.0 |
| [nxos](#requirement\_nxos) | >= 0.5.0 |## Providers
| Name | Version |
|------|---------|
| [nxos](#provider\_nxos) | >= 0.5.0 |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [switch\_1\_name](#input\_switch\_1\_name) | Switch 1 Name. A device name from the provider configuration. | `string` | n/a | yes |
| [switch\_2\_name](#input\_switch\_2\_name) | Switch 2 Name. A device name from the provider configuration. | `string` | n/a | yes |
| [vpc\_domain\_id](#input\_vpc\_domain\_id) | vPC Domain ID. | `number` | n/a | yes |
| [vpc\_auto\_recovery](#input\_vpc\_auto\_recovery) | vPC Auto-Recovery Feature. | `bool` | `false` | no |
| [vpc\_auto\_recovery\_interval](#input\_vpc\_auto\_recovery\_interval) | vPC Auto-Recovery Interval. | `number` | `240` | no |
| [vpc\_delay\_restore\_orphan\_port](#input\_vpc\_delay\_restore\_orphan\_port) | Delay restore for orphan ports. | `number` | `0` | no |
| [vpc\_delay\_restore\_svi](#input\_vpc\_delay\_restore\_svi) | Delay restore for SVI. | `number` | `10` | no |
| [vpc\_delay\_restore\_vpc](#input\_vpc\_delay\_restore\_vpc) | Delay restore for vPC links. | `number` | `30` | no |
| [vpc\_fast\_convergence](#input\_vpc\_fast\_convergence) | vPC Fast Convergence. | `bool` | `false` | no |
| [vpc\_graceful\_consistency\_check](#input\_vpc\_graceful\_consistency\_check) | Graceful Type-1 Consistency Check. | `bool` | `true` | no |
| [vpc\_l3\_peer\_router](#input\_vpc\_l3\_peer\_router) | vPC L3 Peer Router. | `bool` | `false` | no |
| [vpc\_l3\_peer\_router\_syslog](#input\_vpc\_l3\_peer\_router\_syslog) | vPC L3 Peer Router Syslog. | `bool` | `false` | no |
| [vpc\_l3\_peer\_router\_syslog\_interval](#input\_vpc\_l3\_peer\_router\_syslog\_interval) | vPC L3 Peer Router Syslog Interval. | `number` | `3600` | no |
| [vpc\_peer\_gateway](#input\_vpc\_peer\_gateway) | VPC Peer Gateway. | `bool` | `false` | no |
| [vpc\_peer\_ip](#input\_vpc\_peer\_ip) | vPC Peer IP. | `string` | `"0.0.0.0"` | no |
| [vpc\_peer\_switch](#input\_vpc\_peer\_switch) | vPC pair switches. | `bool` | `false` | no |
| [vpc\_role\_priority\_switch\_1](#input\_vpc\_role\_priority\_switch\_1) | vPC role priority Switch 1. | `number` | `32667` | no |
| [vpc\_role\_priority\_switch\_2](#input\_vpc\_role\_priority\_switch\_2) | vPC role priority Switch 2. | `number` | `32667` | no |
| [vpc\_sys\_mac\_switch\_1](#input\_vpc\_sys\_mac\_switch\_1) | System mac Switch 1. | `string` | `"00:00:00:00:00:00"` | no |
| [vpc\_sys\_mac\_switch\_2](#input\_vpc\_sys\_mac\_switch\_2) | System mac Switch 2. | `string` | `"00:00:00:00:00:00"` | no |
| [vpc\_system\_priority\_switch\_1](#input\_vpc\_system\_priority\_switch\_1) | System Priority Switch 1. | `number` | `32667` | no |
| [vpc\_system\_priority\_switch\_2](#input\_vpc\_system\_priority\_switch\_2) | System Priority Switch 2. | `number` | `32667` | no |
| [vpc\_track](#input\_vpc\_track) | Tracking object to suspend vPC if object goes down. | `number` | `0` | no |
| [vpc\_virtual\_ip](#input\_vpc\_virtual\_ip) | vPC virtual IP address (vIP). | `string` | `"0.0.0.0"` | no |
| [keepalive\_ip\_switch\_1](#input\_keepalive\_ip\_switch\_1) | Switch 1 Keeepalive IP. | `string` | n/a | yes |
| [keepalive\_ip\_switch\_2](#input\_keepalive\_ip\_switch\_2) | Switch 2 Keeepalive IP. | `string` | n/a | yes |
| [keepalive\_flush\_timeout](#input\_keepalive\_flush\_timeout) | Keepalive flush timeout. | `number` | `3` | no |
| [keepalive\_interval](#input\_keepalive\_interval) | Keepalive interval. | `number` | `1000` | no |
| [keepalive\_timeout](#input\_keepalive\_timeout) | Keepalive timeout. | `number` | `5` | no |
| [keepalive\_vrf](#input\_keepalive\_vrf) | Switch 1 & Switch 2 Keepalive VRF. | `string` | n/a | yes |
| [peer\_link\_port\_channel\_mode](#input\_peer\_link\_port\_channel\_mode) | Peer Link Port-Channel mode | `string` | `"active"` | no |
| [peer\_link\_maximum\_links](#input\_peer\_link\_maximum\_links) | Peer Link Port-Channel maximum links. | `number` | `32` | no |
| [peer\_link\_minimum\_links](#input\_peer\_link\_minimum\_links) | Peer Link Port-Channel minimum links. | `number` | `1` | no |
| [peer\_link\_mtu](#input\_peer\_link\_mtu) | Peer Link MTU. | `number` | `1500` | no |
| [peer\_link\_interfaces](#input\_peer\_link\_interfaces) | List of interfaces part of the vPC Peer-Link. | `list(string)` | n/a | yes |
| [peer\_link\_port\_channel\_id](#input\_peer\_link\_port\_channel\_id) | vPC Peer-Link Port-Channel ID. | `number` | n/a | yes |
| [virtual\_port\_channels](#input\_virtual\_port\_channels) | List of vPCs. |list(object({| n/a | yes |
id = number
mode = string
layer = string
access_vlan = optional(string)
trunk_vlans = optional(string)
maximum_links = optional(number)
minimum_links = optional(number)
mtu = optional(number)
interfaces = list(string)
}))## Outputs
| Name | Description |
|------|-------------|
| [dn](#output\_dn) | Distinguished name of the object. |## Resources
| Name | Type |
|------|------|
| [nxos_feature_lacp.fmLacp](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/feature_lacp) | resource |
| [nxos_feature_vpc.mVpc](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/feature_vpc) | resource |
| [nxos_physical_interface.l1PhysIf_peer_link](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/physical_interface) | resource |
| [nxos_physical_interface.l1PhysIf_virtual_port_channel](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/physical_interface) | resource |
| [nxos_port_channel_interface.pcAggrIf_peer_link](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/port_channel_interface) | resource |
| [nxos_port_channel_interface.pcAggrIf_virtual_port_channel](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/port_channel_interface) | resource |
| [nxos_port_channel_interface_member.pcRsMbrIfs_peer_link](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/port_channel_interface_member) | resource |
| [nxos_port_channel_interface_member.pcRsMbrIfs_virtual_port_channel](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/port_channel_interface_member) | resource |
| [nxos_rest.vpcKeepalive_switch1](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/rest) | resource |
| [nxos_rest.vpcKeepalive_switch2](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/rest) | resource |
| [nxos_rest.vpcPeerLink](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/rest) | resource |
| [nxos_vpc_domain.vpcDom](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/vpc_domain) | resource |
| [nxos_vpc_instance.vpcInst](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/vpc_instance) | resource |
| [nxos_vpc_interface.vpcIf](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/vpc_interface) | resource |