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

r/equinix_metal_virtual_circuit vlan_id field must be updateable, and not force_new #268

Closed
ocobles opened this issue Nov 22, 2022 · 0 comments · Fixed by #269
Closed

r/equinix_metal_virtual_circuit vlan_id field must be updateable, and not force_new #268

ocobles opened this issue Nov 22, 2022 · 0 comments · Fixed by #269
Milestone

Comments

@ocobles
Copy link
Contributor

ocobles commented Nov 22, 2022

Looking for an alternative for the situation described in #222

I just found that vlan_id has force_new but it is something that can be updated in the API.

"vlan_id": {
Type: schema.TypeString,
Optional: true,
Description: "UUID of the VLAN to associate",
ExactlyOneOf: []string{"vlan_id", "vrf_id"},
ForceNew: true,
},

It must be replaced with:

"vlan_id": { 
 	Type:         schema.TypeString, 
 	Optional:     true, 
 	Description:  "UUID of the VLAN to associate", 
 	ExactlyOneOf: []string{"vlan_id", "vrf_id"}, 
 },

I think there was a confusion between vlan_id and vnid, because they are also mixed in the API, actually vnid is been checked in the update function but it is a computed attribute.

if d.HasChange("vnid") {
vnid := d.Get("vnid").(string)
ur.VirtualNetworkID = &vnid
}

It must be replaced with:

if d.HasChange("vlan_id") { 
 	vnid := d.Get("vlan_id").(string) 
 	ur.VirtualNetworkID = &vnid 
 } 
@ocobles ocobles changed the title r/equinix_metal_virtual_circuit vlan field must be updateable, and not force_new r/equinix_metal_virtual_circuit vlan_id field must be updateable, and not force_new Nov 22, 2022
@ocobles ocobles added this to the v1.11.0 milestone Nov 22, 2022
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

Successfully merging a pull request may close this issue.

1 participant