cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
489
Views
1
Helpful
2
Replies

[Terraform] How to remove a VLAN.

I create the VLAN this way. On the device it creates correctly. How do I delete this VLAN now?

resource "nxos_rest" "create-vlan" {
dn = "sys/bd"
class_name = "bdEntity"
children = [
{
rn = "sys/bd/bd-[vlan-55]"
class_name = "l2BD"
content = {
name = "this-is-vlan-55"
fabEncap = "vlan-55"
}
}
]
}

I do not see how this VLAN can be removed. Even if I remove this resource from the main.tf file this VLAN still remains, I already had a similar case with CDP and LLDP added by nxos_rest. To this day this has not been fixed, and it was reported 3 months ago. On GitHub where I reported the issue nobody even wrote me back.

1 Accepted Solution

Accepted Solutions
2 Replies 2

danischm
Cisco Employee
Cisco Employee

Thanks for your help. I didn't know it would work like that. That's what I missed, it probably solves my other problem with CDP and LLDP.