Skip to content

Commit

Permalink
Log zoneID as d.Get(zone) might return nil
Browse files Browse the repository at this point in the history
Update changelog

Properly do changelog

Align changelog name with PR number
  • Loading branch information
schans committed Jul 15, 2022
1 parent 108fbb5 commit f773b31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/1777.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/cloudflare_zone_lockdown: Fix crash when logging upstream error message
```
2 changes: 1 addition & 1 deletion internal/provider/resource_cloudflare_zone_lockdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func resourceCloudflareZoneLockdownUpdate(ctx context.Context, d *schema.Resourc
r, err := client.UpdateZoneLockdown(ctx, zoneID, d.Id(), newZoneLockdown)

if err != nil {
return diag.FromErr(fmt.Errorf("error updating zone lockdown for zone %q: %w", d.Get("zone").(string), err))
return diag.FromErr(fmt.Errorf("error updating zone lockdown for zone %q: %w", zoneID, err))
}

if r.Result.ID == "" {
Expand Down

0 comments on commit f773b31

Please sign in to comment.