Introduce apstra_datacenter_routing_zone_loopback_addresses
resource
#1037
+995
−3
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 introduces the
apstra_datacenter_routing_zone_loopback_addresses
resource.It's a vaguely imperative resource in the sense that it doesn't create anything, it merely assigns (or clears) address values from fields which already exist and may already contain values.
This resource relies heavily on a private data struct which records system IDs where values were previously written by the
Create()
andUpdate()
methods. The record looks like this:The various methods make use of these values when determining which interfaces and addresses are relevant to their work:
Read()
discards values not previously assigned by this resourceUpdate()
clears values previously assigned but not part of the currentplan
Delete()
clears all previously assigned valuesThe
Request()
function in this resource is different from most for a couple of reasons:Closes #981