josenk / terraform-provider-esxi

Terraform-provider-esxi plugin
GNU General Public License v3.0
540 stars 154 forks source link

Can't get logger to deploy with terraform #126

Closed mlinton closed 3 years ago

mlinton commented 3 years ago

Using the latest version of terraform (0.13) and esxi plugin from josenk v1.8.0

Everything seems to be working until I attempt to terraform apply and it gets hungup on the logger host. I get a "Error: host for provisioner cannot be empty" error.

In main.tf, the remote-exec provisioner for logger is set to:

    provisioner "remote-exec" {
    inline = [
      "sudo ifconfig eth1 up || echo 'eth1 up'",
      "sudo ifconfig eth2 up || echo 'eth2 up'",
      "sudo route add default gw 192.168.76.1 || echo 'route exists'"
    ]

    connection {
      host        = self.ip_address
      type        = "ssh"
      user        = "vagrant"
      password    = "vagrant"
    }

When I attempt to reapply the plan it fails each time with the same message, and in the events on the esxi host, it shows:

image

Any ideas on what I'm doing wrong?

mlinton commented 3 years ago

Duplicate