Skip to content

Conversation

@tobiwang
Copy link
Contributor

Also tried to fix these issues:

  • To skip address-family configuration when vrf name is 'default'
  • To make sure nxos_ospf_interface and nxos_ospf_authentication be processed only if interface has related definition.

tobiwang and others added 25 commits July 13, 2025 08:02
…vice-specific > configuration_template > device_group > global
make interface group variables interpolation work
make config template variables interpolation work with precedence: de…
…mplates.

variables interpolation precedence:
device_specific > configuration_template > device_group > global
- Add nxos_vpc_domain resource for VPC domain configuration
- Add nxos_vpc_keepalive resource for VPC keepalive settings
- Add nxos_vpc_peerlink resource for VPC peer-link configuration
- Add nxos_vpc_interface resource for VPC member interfaces
- Update main.tf to include VPC resources in dependencies
- Add VPC defaults to defaults.yaml
- Update README.md with VPC resource documentation
- Add comprehensive VPC example with documentation

This enables full VPC lifecycle management including:
- VPC domain setup with role priority and system MAC
- Keepalive configuration for failure detection
- Peer-link configuration for synchronization
- Member interface assignment with VPC IDs

Supports both ethernet and port-channel interfaces as VPC members.
nxos_vpc.tf Outdated
key = format("%s/%s", device.name, local.device_config[device.name].vpc_domain.domain_id)
device = device.name
domain_id = try(local.device_config[device.name].vpc_domain.domain_id, local.defaults.nxos.devices.configuration.vpc_domains.domain_id, null)
admin_state = try(local.device_config[device.name].vpc_domain.admin_state, local.defaults.nxos.devices.configuration.vpc_domains.admin_state, true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preferably we do not hardcode default values in the code but rather define them in defaults.yaml and use "null" (omit) as a last resort.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with the 'return null' principle.

@tobiwang tobiwang requested a review from danischm July 30, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants