Skip to content

Commit

Permalink
Fix read when rpaas_route is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
wpjunior committed Oct 21, 2021
1 parent 6603289 commit 415fdf8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions rpaas/resource_rpaas_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,15 @@ func resourceRpaasBlockRead(ctx context.Context, d *schema.ResourceData, meta in
}

for _, b := range blocks {
if b.Name != blockName {
continue
if b.Name == blockName {
d.Set("name", b.Name)
d.Set("content", b.Content)
return nil
}
d.Set("name", b.Name)
d.Set("content", b.Content)
return nil
}

d.SetId("")

return nil
}

Expand Down

0 comments on commit 415fdf8

Please sign in to comment.