Skip to content

Commit

Permalink
Merge pull request #128 from sydorovdmytro/DS_fix_registry
Browse files Browse the repository at this point in the history
fix: recreate missing registry
  • Loading branch information
wrighbr authored Jun 21, 2021
2 parents aa8bba0 + 01a0200 commit 469bd6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions provider/resource_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ func resourceRegistryRead(d *schema.ResourceData, m interface{}) error {
apiClient := m.(*client.Client)

resp, _, err := apiClient.SendRequest("GET", d.Id(), nil, 200)
if err != nil {
d.SetId("")
return nil
}

var jsonData models.RegistryBody
err = json.Unmarshal([]byte(resp), &jsonData)
Expand Down

0 comments on commit 469bd6c

Please sign in to comment.