mirror of
https://github.com/letic/terraform-provider-proxmox.git
synced 2024-09-28 22:16:03 +00:00
support terraform 0.12 connection rules
This commit is contained in:
parent
23e407d44c
commit
e38fec05ce
@ -172,6 +172,14 @@ auto eth0
|
|||||||
iface eth0 inet dhcp
|
iface eth0 inet dhcp
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
connection {
|
||||||
|
type = "ssh"
|
||||||
|
user = "${self.ssh_user}"
|
||||||
|
private_key = "${self.ssh_private_key}"
|
||||||
|
host = "${self.ssh_host}"
|
||||||
|
port = "${self.ssh_port}"
|
||||||
|
}
|
||||||
|
|
||||||
provisioner "remote-exec" {
|
provisioner "remote-exec" {
|
||||||
inline = [
|
inline = [
|
||||||
"ip a"
|
"ip a"
|
||||||
|
@ -391,6 +391,14 @@ func resourceVmQemu() *schema.Resource {
|
|||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
},
|
},
|
||||||
|
"ssh_host": {
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Computed: true,
|
||||||
|
},
|
||||||
|
"ssh_port": {
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Computed: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -922,6 +930,11 @@ func initConnInfo(
|
|||||||
// Done with proxmox API, end parallel and do the SSH things
|
// Done with proxmox API, end parallel and do the SSH things
|
||||||
pmParallelEnd(pconf)
|
pmParallelEnd(pconf)
|
||||||
|
|
||||||
|
// Optional convience attributes for provisioners
|
||||||
|
d.Set("ssh_host", sshHost)
|
||||||
|
d.Set("ssh_port", sshPort)
|
||||||
|
|
||||||
|
// This connection INFO is longer shared up to the providers :-(
|
||||||
d.SetConnInfo(map[string]string{
|
d.SetConnInfo(map[string]string{
|
||||||
"type": "ssh",
|
"type": "ssh",
|
||||||
"host": sshHost,
|
"host": sshHost,
|
||||||
|
Loading…
Reference in New Issue
Block a user