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

Change rack_type schema to use lists rather than maps #335

Open
chrismarget-j opened this issue Aug 30, 2023 · 0 comments
Open

Change rack_type schema to use lists rather than maps #335

chrismarget-j opened this issue Aug 30, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@chrismarget-j
Copy link
Collaborator

The following attributes of a rack_type each use maps keyed by attribute instance name:

  • leaf switch
  • access switch
  • generic system
  • access switch links
  • generic system links

This is an inelegant solution to two problems:

  1. a since-resolved terraform plugin framework issue with nested sets
  2. a misunderstanding that apstra doesn't preserve order for these objects

With both of these problems behind us it looks like these attributes can be either sets or lists.

Sets are possible/safe because each attribute has a name field which is required by Apstra to be unique.

Lists are possible because (we now believe) that Apstra preserves the order in which the object were submitted.

With that in mind, lists appear to be the best approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants