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

apstra_freeform_link resource: detect endpoint type: internal vs. external #825

Open
chrismarget-j opened this issue Aug 27, 2024 · 1 comment

Comments

@chrismarget-j
Copy link
Collaborator

The apstra_freeform_link resource is currently unaware of the type (internal/external) of the system specified by the user.

External systems must not have interface_name and transformation_id specified (API enforces this).

Internal systems should not have interface_name and transformation_id specified, but the API accepts a half-baked endpoint specification.

If we knew the type (internal/external) of the generic systems, we could improve things by:

  • not allowing half-baked links to be created
  • replacing the API error with our own error

Consider:

  • create a map[string]bool indicating whether each system is internal during Create().
  • store the map in provider private data
  • error during Create() and Update() if the user over or under specifies the link.

This discussion started in #823

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

No branches or pull requests

2 participants
@chrismarget-j and others