Skip to content

Commit

Permalink
Use ListInstanceTypesResponse.FindInstanceType
Browse files Browse the repository at this point in the history
  • Loading branch information
tgrondier committed Dec 18, 2024
1 parent a25424b commit c3c4b9d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pkg/resources/instance_pool/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,12 @@ func dsRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.
if err == nil {
return diag.FromErr(err)
}
for _, p := range rep.InstancePools {
if p.Name == name {
pool = &p
break
}
}

p, err := rep.FindInstancePool(name.(string))
if err == nil {
return diag.FromErr(err)
}
pool = &p
}

if err != nil {
Expand Down

0 comments on commit c3c4b9d

Please # to comment.