rakutentech / terraform-provider-vsphere

[DEPRECATED] Terraform Custom Provider for VMware vSphere
Mozilla Public License 2.0
82 stars 30 forks source link

Error setting up client #30

Open fulloflilies opened 9 years ago

fulloflilies commented 9 years ago

Hi,

I am getting following error when I run "terramform plan"

Error setting up client: Post https://vCenter_IP/sdk: tls: failed to parse certificate from server: x509: negative serial number

I am using terraform-provider-vsphere v0.3.1 and here is my code. Any idea will be helpful!

provider "vsphere" {
    user = "${var.vsphere_user}"
    password = "${var.vsphere_password}"
    vcenter_server = "${var.vsphere_vcenter}"
}

resource "vsphere_virtual_machine" "default" {
    name = "VM Name"
    datacenter = "dc"
    cluster = "cl"
    vcpu = 2
    memory = 2086
    disk {
        datastore = "datastore1"
        size = "16"    
    }
    gateway = "10.10.10.254"
    network_interface {
        label = "VM Network"
        ip_address = "10.10.10.81"
        subnet_mask = "255.255.255.0"
    }
}
tkak commented 9 years ago

Do you have a certificate installed in your environment?

sterburg commented 9 years ago

Please see golang/go#8265 This is a generic golang crypto issue. I've used zmap/zgrab@a3d044e patch to solve this (having to recompile terraform-provider-vsphere myself every time a new release is released)

fulloflilies commented 9 years ago

To tkak No, I don't have any certificate installed.

tkak commented 9 years ago

vmware/govmomi#345