bpg / terraform-provider-proxmox

Terraform Provider for Proxmox
https://registry.terraform.io/providers/bpg/proxmox
Mozilla Public License 2.0
874 stars 139 forks source link

connection reset by peer when creating new machines from templates #1624

Open valkiriaaquatica opened 2 weeks ago

valkiriaaquatica commented 2 weeks ago

Describe the bug Probably is a network error, but this error does not happen with other proxmox providers.. Having correct credentials, user, endpoint, connectivity after the terrraform apply the it does not connect to proxmox and throws this errror

_│ Error: error waiting for VM clone: All attempts fail: │ #1: error cloning VM: failed to authenticate HTTP POST request (path: nodes/pve/qemu/197/clone) - Reason: failed to authenticate: failed to retrieve authentication response: Post "https://ip_proxmox:8006/api2/json/access/ticket": read tcp my_ip:57402->prox,px_nodeip:8006: read: connection reset by peer

Probably os because I am using a VPN to access the network where there are also palo alto firewalls that maybe is making the golang backend to not work because doing the SAME POST request with CURL works well. So i guess is someathinw with the way golang executes it?

To Reproduce have a template machine to clone from try to clone with this main.tf

resource "proxmox_virtual_environment_vm" "dns" {
  name        = var.vm_name
  description = var.vm_description
  node_name   = var.node_name
  vm_id       = var.vm_id
  tags        = var.vm_tags

  agent {
    enabled = var.agent_enabled
  }

  cpu {
    cores   = "2"
    sockets = "1"
    type    = var.cpu_type
  }

  memory {
    dedicated = "4096"
  }

  operating_system {
    type = var.os_type
  }

  disk {
    datastore_id = var.disk_datastore_id
    file_format  = var.disk_file_format
    interface    = var.disk_interface
    size         = var.disk_size
  }

  initialization {
    ip_config {
      ipv4 {
        address = "dhcp"
      }
    }
  }

  clone {
    vm_id = var.clone_vm_id 
    full  = var.clone_full
  }
}

Please also provide a minimal Terraform configuration that reproduces the issue.

Using latest terraformversion and bgp latest versionn provider

Expected behavior Create the virtual machine and resize the disk, the problem is the connection.

Screenshots The errro above

Additional context POST request with curl is done correctly but with terraform not(error above).