You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to apstra_datacenter_virtual_network.vn_10011, provider "provider["registry.terraform.io/juniper/apstra"]" produced an unexpected new value: .bindings: element "3cSGPFxXVKWLvhfGTA"
│ has vanished.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to apstra_datacenter_virtual_network.vn_10011, provider "provider["registry.terraform.io/juniper/apstra"]" produced an unexpected new value: .bindings: element "rsNRTTbpZSwD-IR8Tw"
│ has vanished.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to apstra_datacenter_virtual_network.vn_10011, provider "provider["registry.terraform.io/juniper/apstra"]" produced an unexpected new value: .bindings: new element
│ "TBUP7wTacS5vbuIPuA" has appeared.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
The text was updated successfully, but these errors were encountered:
skameswa
changed the title
Binding vlans to switch_ids(without binding constructor) produces inconsistent result after apply and errors out.
Provider v0.84.0: Binding vlans to switch_ids(without binding constructor) produces inconsistent result after apply and errors out. Apstra 5.1
Feb 20, 2025
Hello @skameswa, thank you for opening this issue.
Are the switches in question are members of an MLAG or ESI-LAG pair?
For individual switches, you can use their IDs directly when creating bindings.
For switches which are members of a redundancy group, the API accepts either of these two:
Both switch IDs together in one call
The ID of the redundancy group
If you send both switch IDs, the API accepts them but then swaps in the redundancy group ID. There’s not much we can do about that behavior from the terraform side. Heck, we can’t even tell which ID (individual or group) has been passed in. Resolving this complexity is the main reason the binding constructor data source exists. The example in the documentation tries to spell that out, but there’s probably room for further clarification.
Here is the TF code for adding vlan and its binding:
/*
data "apstra_datacenter_systems" "vn_10002_leaf_ah1-dc-b6-sw-1" {
blueprint_id = apstra_datacenter_blueprint.instantiation.id
filters = [
{
role = "leaf"
hostname = "ah1-dc-b6-sw-1"
system_type = "switch"
}
]
}
data "apstra_datacenter_systems" "vn_10002_leaf_ah1-dc-b6-sw-2" {
blueprint_id = apstra_datacenter_blueprint.instantiation.id
filters = [
{
role = "leaf"
hostname = "ah1-dc-b6-sw-2"
system_type = "switch"
}
]
}
resource "apstra_datacenter_virtual_network" "vn_10002" {
name = "vl2"
description = "AH-unix"
blueprint_id = apstra_datacenter_blueprint.instantiation.id
type = "vxlan"
routing_zone_id = data.apstra_datacenter_routing_zone.SSG.id
ipv4_connectivity_enabled = "false"
ipv4_virtual_gateway_enabled = "false"
vni = "10002"
reserve_vlan = "false"
export_route_targets = ["65310:10002", "65310:268445458"]
import_route_targets = ["65310:10002", "65310:268445458"]
}
*/
Here is the error message:
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to apstra_datacenter_virtual_network.vn_10011, provider "provider["registry.terraform.io/juniper/apstra"]" produced an unexpected new value: .bindings: element "3cSGPFxXVKWLvhfGTA"
│ has vanished.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to apstra_datacenter_virtual_network.vn_10011, provider "provider["registry.terraform.io/juniper/apstra"]" produced an unexpected new value: .bindings: element "rsNRTTbpZSwD-IR8Tw"
│ has vanished.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│
│ When applying changes to apstra_datacenter_virtual_network.vn_10011, provider "provider["registry.terraform.io/juniper/apstra"]" produced an unexpected new value: .bindings: new element
│ "TBUP7wTacS5vbuIPuA" has appeared.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
The text was updated successfully, but these errors were encountered: