Introduce reserved_vlan_id
attribute to apstra_datacenter_virtual_network
resource
#1044
+102
−24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the
reserved_vlan_id
attribute to theapstra_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 eachbinding
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:
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.todo:
in the binding validationCloses #1039