Skip to content

Commit

Permalink
add err check
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Nov 16, 2023
1 parent 85f935d commit 8daeac2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tfstate/remote_azurerm.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ func getDefaultAzureAccessKey(ctx context.Context, resourceGroupName string, acc
}

clientFactory, err := armstorage.NewClientFactory(subscriptionID, cred, nil)
if err != nil {
return "", errors.Wrap(err, "failed to create client factory")
}
keys, err := clientFactory.NewAccountsClient().ListKeys(ctx, resourceGroupName, accountName, nil)
if err != nil {
return "", errors.Wrap(err, "failed to list keys")
Expand Down

0 comments on commit 8daeac2

Please sign in to comment.