{"action":"closed","issue":{"url":"https://api.github.com/repos/hashicorp/terraform/issues/2237","labels_url":"https://api.github.com/repos/hashicorp/terraform/issues/2237/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/terraform/issues/2237/comments","events_url":"https://api.github.com/repos/hashicorp/terraform/issues/2237/events","html_url":"https://github.com/hashicorp/terraform/issues/2237","id":85238527,"number":2237,"title":"remote-exec provisioner w/SSH fails to obtain Host/IP when creating Windows resource on vSphere","user":{"login":"mijit","id":1820718,"avatar_url":"https://avatars.githubusercontent.com/u/1820718?v=3","gravatar_id":"","url":"https://api.github.com/users/mijit","html_url":"https://github.com/mijit","followers_url":"https://api.github.com/users/mijit/followers","following_url":"https://api.github.com/users/mijit/following{/other_user}","gists_url":"https://api.github.com/users/mijit/gists{/gist_id}","starred_url":"https://api.github.com/users/mijit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mijit/subscriptions","organizations_url":"https://api.github.com/users/mijit/orgs","repos_url":"https://api.github.com/users/mijit/repos","events_url":"https://api.github.com/users/mijit/events{/privacy}","received_events_url":"https://api.github.com/users/mijit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-04T19:19:38Z","updated_at":"2015-06-04T19:49:23Z","closed_at":"2015-06-04T19:49:23Z","body":"I'm successfully creating Windows resources on an internal vSphere cluster. However, when I try to use SSH to provision, Terraform is not picking up the IP of the resource it just created. Example:\r\n\r\n    PS> terraform apply\r\n    vsphere_virtual_machine.app01: Creating...\r\n      cpus:          \"\" => \"4\"\r\n      datacenter:    \"\" => \"DC1\"\r\n      folder:        \"\" => \"Test Folder\"\r\n      host:          \"\" => \"Dev Host\"\r\n      image:         \"\" => \"Templates/MyTemplate\"\r\n      ip_address:    \"\" => \"<computed>\"\r\n      linked_clone:  \"\" => \"0\"\r\n      memory:        \"\" => \"2048\"\r\n      name:          \"\" => \"APP01\"\r\n      power_on:      \"\" => \"1\"\r\n    vsphere_virtual_machine.app01: Provisioning with 'remote-exec'...\r\n    vsphere_virtual_machine.app01 (remote-exec): Connecting to remote host via SSH...\r\n    vsphere_virtual_machine.app01 (remote-exec):   Host:\r\n    vsphere_virtual_machine.app01 (remote-exec):   User: Administrator\r\n    vsphere_virtual_machine.app01 (remote-exec):   Password: true\r\n    vsphere_virtual_machine.app01 (remote-exec):   Private key: false\r\n    vsphere_virtual_machine.app01 (remote-exec):   SSH Agent: false\r\n    vsphere_virtual_machine.app01 (remote-exec): Connecting to remote host via SSH...\r\n    vsphere_virtual_machine.app01 (remote-exec):   Host:\r\n    vsphere_virtual_machine.app01 (remote-exec):   User: Administrator\r\n    vsphere_virtual_machine.app01 (remote-exec):   Password: true\r\n    vsphere_virtual_machine.app01 (remote-exec):   Private key: false\r\n    vsphere_virtual_machine.app01 (remote-exec):   SSH Agent: false\r\n\r\n    ...repeat above until timeout...\r\n\r\n    vsphere_virtual_machine.app01: Error: 1 error(s) occurred:\r\n\r\n    * dial tcp :22: ConnectEx tcp: The requested address is not valid in its context.\r\n\r\nThe resource is created and I can log into it via console *and* SSH from the command line, but Terraform appears to not know its IP (note the empty \"Host:\" lines.) Note that I need to connect via IP in this case since DNS is not yet available.\r\n\r\nHere is the connection and remote-exec block:\r\n\r\n    connection {\r\n        user = \"Administrator\"\r\n        password = \"${var.admin_password}\"\r\n    }\r\n    provisioner \"remote-exec\" {\r\n        inline = [\"hostname\"]\r\n    }\r\n\r\nIs Terraform capable of provisioning Windows resources with SSH? I've tried WinRM, but that has its own issues for my particular use case (it requires insecure settings and is too particular about AD/DNS for my needs.) I prefer to get SSH working. How can I go about troubleshooting this problem?\r\n\r\nThanks,\r\nMichael"}}