Terraform: connection block not validated if not present

Created on 11 Jun 2019  ยท  2Comments  ยท  Source: hashicorp/terraform

When using a provisioner that requires a connection to the remote host, a missing connection block is not validated at all, causing the provisioner to repeatedly attempt and fail to connect.

resource "null_resource" "vm" {
  provisioner "remote-exec" {
    inline = [
      "echo ok",
    ]
  }
}

Log:

null_resource.vm (remote-exec): Connecting to remote host via SSH...
null_resource.vm (remote-exec):   Host:

The host field is always required, and the configuration should fail during validation.

bug config v0.12

Most helpful comment

We have more complaints about this, would it be possible to fix this? Is there something we can do?

All 2 comments

We have more complaints about this, would it be possible to fix this? Is there something we can do?

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings