diff --git a/backend/remote-state/azure/client.go b/backend/remote-state/azure/client.go index 6c120e722..d63e34ac4 100644 --- a/backend/remote-state/azure/client.go +++ b/backend/remote-state/azure/client.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "log" + "net/http" "github.com/hashicorp/go-multierror" "github.com/hashicorp/go-uuid" @@ -39,7 +40,7 @@ func (c *RemoteClient) Get() (*remote.Payload, error) { ctx := context.TODO() blob, err := c.giovanniBlobClient.Get(ctx, c.accountName, c.containerName, c.keyName, options) if err != nil { - if blob.Response.StatusCode == 404 { + if blob.Response.IsHTTPStatus(http.StatusNotFound) { return nil, nil } return nil, err