-
Notifications
You must be signed in to change notification settings - Fork 13
Description
I'm able to run a snippet like this and create the setting for the spanning-tree in a specific mode for this port:
resource "nxos_spanning_tree_interface" "TEST_SPANTREE" {
for_each = toset([for leaf in local.leafs : leaf.name])
device = each.key
interface_id = "eth1/1"
mode = "edge"
}
When I call terraform destroy, on the terraform side, the object shows that it has been destroyed:

However, when I do a quality check on the interface, by running this command on the cisco switch: show running-config interface eth1/1
This is the problem. The setting was never cleared/destroyed.
I can use the resource nxos_physical_interface to enable a phy interface and then call the terraform destroy command to undo my changes. When I do that and then run my quality-checking command; I get a interface with cleared settings. Which is the type of outcome I'm looking for.
For some reason this bug occurs with the resource, nxos_spanning_tree_interface only. I'm unable to get the same outcome that I get with the resource, nxos_physical_interface.
Is this expected or is this a bug? If it's not a bug, is there anything I'm missing in order to properly destroy/clear this setting. I even tried using nxos_rest to delete the object but it never got deleted either.
