From 0bbb0dc200c54629b83d5ba1ac0fb419d387ef5e Mon Sep 17 00:00:00 2001 From: Matthew Frahry Date: Mon, 22 Mar 2021 14:20:54 -0700 Subject: [PATCH] Fix for #27809 --- backend/remote-state/azure/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/remote-state/azure/client.go b/backend/remote-state/azure/client.go index d63e34ac4a..d3066454de 100644 --- a/backend/remote-state/azure/client.go +++ b/backend/remote-state/azure/client.go @@ -110,7 +110,7 @@ func (c *RemoteClient) Delete() error { ctx := context.TODO() resp, err := c.giovanniBlobClient.Delete(ctx, c.accountName, c.containerName, c.keyName, options) if err != nil { - if resp.Response.StatusCode != 404 { + if !resp.IsHTTPStatus(http.StatusNotFound) { return err } } @@ -152,7 +152,7 @@ func (c *RemoteClient) Lock(info *statemgr.LockInfo) (string, error) { properties, err := c.giovanniBlobClient.GetProperties(ctx, c.accountName, c.containerName, c.keyName, blobs.GetPropertiesInput{}) if err != nil { // error if we had issues getting the blob - if properties.Response.StatusCode != 404 { + if !properties.Response.IsHTTPStatus(http.StatusNotFound) { return "", getLockInfoErr(err) } // if we don't find the blob, we need to build it