Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce reserved_vlan_id attribute to apstra_datacenter_virtual_network resource #1044

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

chrismarget-j
Copy link
Collaborator

@chrismarget-j chrismarget-j commented Feb 21, 2025

This PR adds the reserved_vlan_id attribute to the apstra_datacenter_virtual_network resource.

This attribute became necessary with Apstra 5.x's elimination of mandatory binding of a VN to a switch.

Previously there was no ambiguity about what VLAN should be reserved when configured with reserve_vlan = true, because we checked that each binding had a VLAN assigned (and that they all matched).

But with no binding structs, we don't known what VLAN to set.

Odds and ends:

  • Bugfix in AlsoRequiresNOfValidator.Validate() the only place this validator was used ensured that the attribute to which it was attached was set. Our new use of this validator introduced the possibility that it might not be set. The validator now only runs on attributes which have a value configured (as implied by the "also" in its name)
  • reserve_vlan was not previously part of the test setup, so it's been added.
  • resolved an old todo: in the binding validation

Closes #1039

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.

Provider v0.84.0: Crash in apstra_datacenter_virtual_network resource with Apstra 5.1
1 participant