minor tweaks to connection info setup
This commit is contained in:
parent
d998e883fb
commit
f31b30d4a5
|
@ -187,8 +187,7 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{}
|
|||
d.Set("spot_request_state", *request.State)
|
||||
d.Set("tags", tagsToMap(request.Tags))
|
||||
|
||||
// return nil
|
||||
// let's read the instance data...
|
||||
// Read the instance data, setting up connection information
|
||||
return readInstance(d, meta)
|
||||
}
|
||||
|
||||
|
@ -222,7 +221,6 @@ func readInstance(d *schema.ResourceData, meta interface{}) error {
|
|||
d.Set("public_ip", instance.PublicIpAddress)
|
||||
d.Set("private_dns", instance.PrivateDnsName)
|
||||
d.Set("private_ip", instance.PrivateIpAddress)
|
||||
}
|
||||
|
||||
// set connection information
|
||||
if instance.PublicIpAddress != nil {
|
||||
|
@ -236,6 +234,7 @@ func readInstance(d *schema.ResourceData, meta interface{}) error {
|
|||
"host": *instance.PrivateIpAddress,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue