Skip to content

Commit

Permalink
support a manual port setting for ssh_forward_ip
Browse files Browse the repository at this point in the history
  • Loading branch information
Grant Gongaware committed Oct 2, 2018
1 parent fb9d595 commit 860c150
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,13 @@ func resourceVmQemuCreate(d *schema.ResourceData, meta interface{}) error {
// parse IP address out of ipconfig0
ipMatch := rxIPconfig.FindStringSubmatch(d.Get("ipconfig0").(string))
sshHost = ipMatch[1]

}
// Check if we got a speficied port
if strings.Contains(sshHost, ":") {
sshParts := strings.Split(sshHost, ":")
sshHost = sshParts[0]
sshPort = sshParts[1]
}
} else {
log.Print("[DEBUG] setting up SSH forward")
Expand Down

0 comments on commit 860c150

Please sign in to comment.