Skip to content

Commit

Permalink
azurerm_storage_account - Add 403 (previously only 401) as a valid …
Browse files Browse the repository at this point in the history
…status code for lacking permissions to list keys (#19645)

Co-authored-by: kt <[email protected]>
Fix #19622
  • Loading branch information
magodo authored Jan 9, 2023
1 parent 1d57b3a commit cfd940b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/services/storage/storage_account_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1921,7 +1921,7 @@ func resourceStorageAccountRead(d *pluginsdk.ResourceData, meta interface{}) err
if e, ok := err.(azautorest.DetailedError); ok {
if status, ok := e.StatusCode.(int); ok {
hasWriteLock = status == http.StatusConflict
doesntHavePermissions = status == http.StatusUnauthorized
doesntHavePermissions = (status == http.StatusUnauthorized || status == http.StatusForbidden)
}
}

Expand Down

0 comments on commit cfd940b

Please sign in to comment.