hashicorp/terraform · error
populating details for %s: %+v
Error message
populating details for %s: %+v
What it means
Returned by buildClient when populateAccountDetails fails to extract/populate the storage account details (blob endpoint, key info) from the retrieved storage account model. The %s is the resource ID and %+v is the underlying error from populateAccountDetails.
Source
Thrown at internal/backend/remote-state/azure/api_client.go:113
// Setup the SA client.
client.storageAccountsClient, err = storageaccounts.NewStorageAccountsClientWithBaseURI(config.AuthConfig.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building Storage Accounts client: %+v", err)
}
client.configureClient(client.storageAccountsClient.Client, resourceManagerAuth)
// Populating the storage account detail
storageAccountId := commonids.NewStorageAccountID(config.SubscriptionID, config.ResourceGroupName, client.storageAccountName)
resp, err := client.storageAccountsClient.GetProperties(ctx, storageAccountId, storageaccounts.DefaultGetPropertiesOperationOptions())
if err != nil {
return nil, fmt.Errorf("retrieving %s: %+v", storageAccountId, err)
}
if resp.Model == nil {
return nil, fmt.Errorf("retrieving %s: model was nil", storageAccountId)
}
client.accountDetail, err = populateAccountDetails(storageAccountId, *resp.Model)
if err != nil {
return nil, fmt.Errorf("populating details for %s: %+v", storageAccountId, err)
}
}
return &client, nil
}
func (c *Client) getBlobClient(ctx context.Context) (bc *blobs.Client, err error) {
if c.blobsClient != nil {
return c.blobsClient, nil
}
defer func() {
if err == nil {
c.blobsClient = bc
}
}()
var baseUri stringView on GitHub (pinned to c9def3e214)
Solutions
- Verify the storage account is a standard type with a valid primary blob endpoint in the Azure portal.
- Retry in case of a transient API field issue.
- Upgrade Terraform so populateAccountDetails uses a current SDK model matching the deployed account properties.
Defensive patterns
Strategy: validation
Validate before calling
// Sanity-check the account has a blob endpoint before relying on lookup_blob_endpoint. // (az storage account show -g <rg> -n <acct> --query primaryEndpoints.blob)
Try / catch
client, err := buildClient(ctx, config)
if err != nil && strings.Contains(err.Error(), "populating details") {
// verify account has a valid primary blob endpoint; consider disabling lookup_blob_endpoint
} Prevention
- Verify the storage account is a supported type with a populated primary blob endpoint.
- If endpoint lookup is problematic, provide the endpoint explicitly or disable lookup_blob_endpoint.
- Keep Terraform current so populateAccountDetails matches deployed account shapes.
When it happens
Trigger: GetProperties returned a non-nil model, but extracting the account details (e.g. resolving the primary/secondary blob endpoint from the model's properties) fails. Triggered during terraform init client construction when lookup_blob_endpoint is used.
Common situations: The storage account has no blob endpoint populated (e.g. a non-standard account type/sku, a misprovisioned account); the model's networkAcl/encryption/endpoint fields are in an unexpected shape; SDK/model version mismatch.
Related errors
- retrieving %s: model was nil
- retrieving %s: %+v
- new blob client: %v
- sasToken cannot be empty
- unable to build authorizer for Storage API: %+v
AI-assisted analysis of hashicorp/terraform@c9def3e214 (2026-08-07).
Data as JSON: /api/errors/df6daa238b31ffa0.
Report an issue: GitHub.