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("spot_request_state", *request.State)
|
||||||
d.Set("tags", tagsToMap(request.Tags))
|
d.Set("tags", tagsToMap(request.Tags))
|
||||||
|
|
||||||
// return nil
|
// Read the instance data, setting up connection information
|
||||||
// let's read the instance data...
|
|
||||||
return readInstance(d, meta)
|
return readInstance(d, meta)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +221,6 @@ func readInstance(d *schema.ResourceData, meta interface{}) error {
|
||||||
d.Set("public_ip", instance.PublicIpAddress)
|
d.Set("public_ip", instance.PublicIpAddress)
|
||||||
d.Set("private_dns", instance.PrivateDnsName)
|
d.Set("private_dns", instance.PrivateDnsName)
|
||||||
d.Set("private_ip", instance.PrivateIpAddress)
|
d.Set("private_ip", instance.PrivateIpAddress)
|
||||||
}
|
|
||||||
|
|
||||||
// set connection information
|
// set connection information
|
||||||
if instance.PublicIpAddress != nil {
|
if instance.PublicIpAddress != nil {
|
||||||
|
@ -236,6 +234,7 @@ func readInstance(d *schema.ResourceData, meta interface{}) error {
|
||||||
"host": *instance.PrivateIpAddress,
|
"host": *instance.PrivateIpAddress,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue