Skip to content
Snippets Groups Projects
  1. Mar 06, 2025
  2. Mar 05, 2025
    • Guillaume Samson's avatar
    • Antoine R. Dumont's avatar
      node_bpg: Ignore when a vm is moved from one hypervisor to another · c1f1df96
      Antoine R. Dumont authored
      If we don't ignore this, the terraform plan will involved a vm destruction and
      recreation vm in the other targeted hypervisor.
      
      ```
      Terraform used the selected providers to generate the following execution plan. Resource
      actions are indicated with the following symbols:
      -/+ destroy and then create replacement
      ```
      
      Refs. sysadm-environment#5426
      c1f1df96
    • Antoine R. Dumont's avatar
      admin/money: Decommission vm · 242ddd6f
      Antoine R. Dumont authored
      ```
      terraform destroy -target=module.money.proxmox_virtual_environment_vm.node
      module.money.data.proxmox_virtual_environment_vms.debian12_zfs_template: Reading...
      module.money.data.proxmox_virtual_environment_vms.debian12_zfs_template: Read complete after 0s [id=f0da89b5-3533-4855-baeb-2ded1cdaa9b3]
      module.money.proxmox_virtual_environment_vm.node: Refreshing state... [id=140]
      
      Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
        - destroy
      
      Terraform will perform the following actions:
      
        # module.money.proxmox_virtual_environment_vm.node will be destroyed
        - resource "proxmox_virtual_environment_vm" "node" {
            - acpi                    = true -> null
            - bios                    = "seabios" -> null
            - description             = "Azure billing reporting server" -> null
            - id                      = "140" -> null
            - ipv4_addresses          = [] -> null
            - ipv6_addresses          = [] -> null
            - keyboard_layout         = "en-us" -> null
            - mac_addresses           = [
                - "BE:45:F5:C3:BD:A3",
              ] -> null
            - migrate                 = false -> null
            - name                    = "money" -> null
            - network_interface_names = [] -> null
            - node_name               = "chaillot" -> null
            - on_boot                 = true -> null
            - protection              = false -> null
            - reboot                  = false -> null
            - reboot_after_update     = true -> null
            - scsi_hardware           = "virtio-scsi-pci" -> null
            - started                 = true -> null
            - stop_on_destroy         = false -> null
            - tablet_device           = true -> null
            - tags                    = [
                - "admin",
              ] -> null
            - template                = false -> null
            - timeout_clone           = 1800 -> null
            - timeout_create          = 1800 -> null
            - timeout_migrate         = 1800 -> null
            - timeout_move_disk       = 1800 -> null
            - timeout_reboot          = 1800 -> null
            - timeout_shutdown_vm     = 1800 -> null
            - timeout_start_vm        = 1800 -> null
            - timeout_stop_vm         = 300 -> null
            - vm_id                   = 140 -> null
              # (2 unchanged attributes hidden)
      
            - agent {
                - enabled = false -> null
                - timeout = "15m" -> null
                - trim    = false -> null
                - type    = "virtio" -> null
              }
      
            - cdrom {
                - enabled   = false -> null
                - file_id   = "none" -> null
                - interface = "ide2" -> null
              }
      
            - cpu {
                - cores        = 1 -> null
                - flags        = [] -> null
                - hotplugged   = 0 -> null
                - limit        = 0 -> null
                - numa         = false -> null
                - sockets      = 2 -> null
                - type         = "host" -> null
                - units        = 1024 -> null
                  # (2 unchanged attributes hidden)
              }
      
            - disk {
                - aio               = "io_uring" -> null
                - backup            = true -> null
                - cache             = "none" -> null
                - datastore_id      = "proxmox" -> null
                - discard           = "ignore" -> null
                - file_format       = "raw" -> null
                - interface         = "virtio0" -> null
                - iothread          = false -> null
                - path_in_datastore = "base-10006-disk-0/vm-140-disk-0" -> null
                - replicate         = true -> null
                - size              = 20 -> null
                - ssd               = false -> null
                  # (2 unchanged attributes hidden)
              }
      
            - initialization {
                - datastore_id         = "proxmox" -> null
                - interface            = "ide0" -> null
                - upgrade              = false -> null
                  # (5 unchanged attributes hidden)
      
                - dns {
                    - domain  = "internal.admin.swh.network" -> null
                    - servers = [
                        - "192.168.100.29",
                      ] -> null
                      # (1 unchanged attribute hidden)
                  }
      
                - ip_config {
                    - ipv4 {
                        - address = "192.168.50.65/24" -> null
                        - gateway = "192.168.50.1" -> null
                      }
                  }
      
                - user_account {
                    - keys     = [
                        - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDVKCfpeIMg7GS3Pk03ZAcBWAeDZ+AvWk2k/pPY0z8MJ3YAbqZkRtSK7yaDgJV6Gro7nn/TxdJLo2jEzzWvlC8d8AEzhZPy5Z/qfVVjqBTBM4H5+e+TItAHFfaY5+0WvIahxcfsfaq70MWfpJhszAah3ThJ4mqzYaw+dkr42+a7Gx3Ygpb/m2dpnFnxvXdcuAJYStmHKU5AWGWWM+Fm50/fdMqUfNd8MbKhkJt5ihXQmZWMOt7ls4N8i5NZWnS9YSWow8X/ENOEqCRN9TyRkc+pPS0w9DNi0BCsWvSRJOkyvQ6caEnKWlNoywCmM1AlIQD3k4RUgRWe0vqg/UKPpH3Z root@terraform",
                      ] -> null
                    - username = "root" -> null
                      # (1 unchanged attribute hidden)
                  }
              }
      
            - memory {
                - dedicated      = 2048 -> null
                - floating       = 1024 -> null
                - keep_hugepages = false -> null
                - shared         = 0 -> null
                  # (1 unchanged attribute hidden)
              }
      
            - network_device {
                - bridge       = "vmbr442" -> null
                - disconnected = false -> null
                - enabled      = true -> null
                - firewall     = false -> null
                - mac_address  = "BE:45:F5:C3:BD:A3" -> null
                - model        = "virtio" -> null
                - mtu          = 0 -> null
                - queues       = 0 -> null
                - rate_limit   = 0 -> null
                - vlan_id      = 0 -> null
                  # (1 unchanged attribute hidden)
              }
      
            - operating_system {
                - type = "l26" -> null
              }
          }
      
      Plan: 0 to add, 0 to change, 1 to destroy.
      ╷
      │ Warning: Resource targeting is in effect
      │
      │ You are creating a plan with the -target option, which means that the result of this plan may not represent all of the changes requested by the current configuration.
      │
      │ The -target option is not for routine use, and is provided only for exceptional situations such as recovering from errors or mistakes, or when Terraform specifically suggests to use it as part of an error
      │ message.
      ╵
      
      Do you really want to destroy all resources?
        Terraform will destroy all your managed infrastructure, as shown above.
        There is no undo. Only 'yes' will be accepted to confirm.
      
        Enter a value: yes
      
      module.money.proxmox_virtual_environment_vm.node: Destroying... [id=140]
      module.money.proxmox_virtual_environment_vm.node: Destruction complete after 4s
      ╷
      │ Warning: Applied changes may be incomplete
      │
      │ The plan was created with the -target option in effect, so some changes requested in the configuration may have been ignored and the output values may not be fully updated. Run the following command to verify
      │ that no other changes are pending:
      │     terraform plan
      │
      │ Note that the -target option is not suitable for routine use, and is provided only for exceptional situations such as recovering from errors or mistakes, or when Terraform specifically suggests to use it as
      │ part of an error message.
      ╵
      
      Destroy complete! Resources: 1 destroyed.
      ```
      
      Refs. sysadm-environment#5426
      242ddd6f
  3. Mar 04, 2025
  4. Mar 03, 2025
  5. Feb 28, 2025
  6. Feb 27, 2025
Loading