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

apsara_datacenter_device_allocation bug in Read() after manually clearing interface map via GUI #558

Open
chrismarget-j opened this issue Feb 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@chrismarget-j
Copy link
Collaborator

The Read() function calls state.GetInterfaceMapName() even after determining that no interface map is currently assigned to the node.

state.GetInterfaceMapName() examines a long-ish graph traversal:

(system)->(logical_device)<-(interface_map)->(device_profile)

When that search comes up empty (of course it does, the interface_map is null) we get an error like:

│ Error: interface map <null> not compatible with node "spine1" (etoQcsplnr5iwTNsPWM)
│ 
│   with apstra_datacenter_device_allocation.spine1,
│   on main.tf line 21, in resource "apstra_datacenter_device_allocation" "spine1":
│   21: resource "apstra_datacenter_device_allocation" "spine1" {
│ 
│ expected 1 path linking system "spine1", logical device (any), interface map "" and device profile "", got 0
│ query:
│ "node(type='system',id='etoQcsplnr5iwTNsPWM').out(type='logical_device').node(type='logical_device').in_(type='logical_device').node(type='interface_map',name='n_interface_map',id='').out(type='device_profile').node(type='device_profile',id='')"

The lookup should not have been attempted.

@chrismarget-j chrismarget-j added the bug Something isn't working label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant