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

Network interfaces (of LXCs) are not deleted #753

Closed
GamerBene19 opened this issue Apr 24, 2023 · 0 comments · Fixed by #754
Closed

Network interfaces (of LXCs) are not deleted #753

GamerBene19 opened this issue Apr 24, 2023 · 0 comments · Fixed by #754

Comments

@GamerBene19
Copy link
Contributor

GamerBene19 commented Apr 24, 2023

Disclaimer: Don't know if this is happening to VMs aswell.

When you remove a network interface in the code Terraform correctly shows the difference

 # module.lxcs.proxmox_lxc.tempCopy_100 will be updated in-place
  ~ resource "proxmox_lxc" "tempContainer" {
        id                   = "proxmox/lxc/100"
        # (25 unchanged attributes hidden)

      - network {
          - bridge   = "vmbr0" -> null
          - firewall = false -> null
          - hwaddr   = "B2:6A:15:63:1C:B1" -> null
          - ip       = "manual" -> null
          - mtu      = 0 -> null
          - name     = "eth1" -> null
          - rate     = 0 -> null
          - tag      = 0 -> null
          - type     = "veth" -> null
        }

        # (2 unchanged blocks hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

but does not actually delete that interface.

The required API call is sth like this

curl -X PUT -k -b PVEAuthCookie= -H "CSRFPreventionToken:" -d delete=net20,net21 https://192.168.1.222:8006/api2/json/nodes/node1/qemu/177/config -H 'Authorization: PVEAPIToken=root@pam!api_token=9d6824c0-a1c9-453e-8524-9ce179120c3e'

(command is taken from here)

There also is a TODO in the code for this.

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