Merge pull request #1623 from hashicorp/b-private-ip-ssh

providers/aws: if no public IP, use private IP for SSH by default
pull/1635/head
Mitchell Hashimoto 11 years ago
commit c1464b1c6d

@ -544,6 +544,11 @@ func resourceAwsInstanceCreate(d *schema.ResourceData, meta interface{}) error {
"type": "ssh",
"host": *instance.PublicIPAddress,
})
} else if instance.PrivateIPAddress != nil {
d.SetConnInfo(map[string]string{
"type": "ssh",
"host": *instance.PrivateIPAddress,
})
}
// Set our attributes

Loading…
Cancel
Save