mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
remove duplicate readInstance call
This commit is contained in:
parent
66ad974193
commit
70f1c9c1e6
@ -180,6 +180,7 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{}
|
|||||||
// Instance ID is not set if the request is still pending
|
// Instance ID is not set if the request is still pending
|
||||||
if request.InstanceId != nil {
|
if request.InstanceId != nil {
|
||||||
d.Set("spot_instance_id", *request.InstanceId)
|
d.Set("spot_instance_id", *request.InstanceId)
|
||||||
|
// Read the instance data, setting up connection information
|
||||||
if err := readInstance(d, meta); err != nil {
|
if err := readInstance(d, meta); err != nil {
|
||||||
return fmt.Errorf("[ERR] Error reading Spot Instance Data: %s", err)
|
return fmt.Errorf("[ERR] Error reading Spot Instance Data: %s", err)
|
||||||
}
|
}
|
||||||
@ -187,8 +188,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))
|
||||||
|
|
||||||
// Read the instance data, setting up connection information
|
return nil
|
||||||
return readInstance(d, meta)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func readInstance(d *schema.ResourceData, meta interface{}) error {
|
func readInstance(d *schema.ResourceData, meta interface{}) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user