kubernetes/kops · error

creating storage accounts client: %w

Error message

creating storage accounts client: %w

What it means

The Azure SDK constructor armstorage.NewAccountsClient failed while newAzureCloud built its clients — typically an invalid subscription ID or credential pipeline error.

Source

Thrown at upup/pkg/fi/cloudup/azure/storageaccount.go:54

var _ StorageAccountsClient = (*storageAccountsClientImpl)(nil)

func (c *storageAccountsClientImpl) List(ctx context.Context) ([]*armstorage.Account, error) {
	var l []*armstorage.Account
	pager := c.c.NewListPager(nil)
	for pager.More() {
		resp, err := pager.NextPage(ctx)
		if err != nil {
			return nil, fmt.Errorf("listing storage accounts: %w", err)
		}
		l = append(l, resp.Value...)
	}
	return l, nil
}

func newStorageAccountsClientImpl(subscriptionID string, cred *azidentity.DefaultAzureCredential) (*storageAccountsClientImpl, error) {
	c, err := armstorage.NewAccountsClient(subscriptionID, cred, nil)
	if err != nil {
		return nil, fmt.Errorf("creating storage accounts client: %w", err)
	}
	return &storageAccountsClientImpl{
		c: c,
	}, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify AZURE_SUBSCRIPTION_ID and credential environment variables
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/azure/storageaccount.go:54 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/fea94f86e99d5cb5. Report an issue: GitHub.