hashicorp/terraform · error
populating details for %s: `model.Properties` was nil
Error message
populating details for %s: `model.Properties` was nil
What it means
populateAccountDetails (storage_client_helpers.go:124) dereferences account.Properties to read IsHnsEnabled and the primary endpoints. If the StorageAccount response from ARM has a nil Properties, there is nothing to read and the helper aborts defensively.
Source
Thrown at internal/backend/remote-state/azure/storage_client_helpers.go:124
default:
return nil, fmt.Errorf("internal-error: unrecognised endpoint type %q when building storage client", endpointType)
}
if baseUri == nil {
return nil, fmt.Errorf("determining %s endpoint for %s: missing primary endpoint", endpointType, ad.StorageAccountId)
}
return baseUri, nil
}
func populateAccountDetails(accountId commonids.StorageAccountId, account storageaccounts.StorageAccount) (*AccountDetails, error) {
out := AccountDetails{
Kind: pointer.From(account.Kind),
StorageAccountId: accountId,
}
if account.Properties == nil {
return nil, fmt.Errorf("populating details for %s: `model.Properties` was nil", accountId)
}
if account.Properties.PrimaryEndpoints == nil {
return nil, fmt.Errorf("populating details for %s: `model.Properties.PrimaryEndpoints` was nil", accountId)
}
props := *account.Properties
out.IsHnsEnabled = pointer.From(props.IsHnsEnabled)
endpoints := *props.PrimaryEndpoints
if endpoints.Blob != nil {
endpoint := strings.TrimSuffix(*endpoints.Blob, "/")
out.primaryBlobEndpoint = pointer.To(endpoint)
}
if endpoints.Dfs != nil {
endpoint := strings.TrimSuffix(*endpoints.Dfs, "/")
out.primaryDfsEndpoint = pointer.To(endpoint)
}
if endpoints.File != nil {View on GitHub (pinned to c9def3e214)
Solutions
- Retry; if persistent, inspect the raw GET response for the account.
- Confirm the storage account exists and the identity can read it.
- Update terraform to a version whose Azure SDK matches your cloud.
- If it recurs, report the account ID and ARM response to maintainers.
Defensive patterns
Strategy: validation
Validate before calling
# confirm the account returns a Properties object az storage account show --name <acct> --resource-group <rg> \ --query "properties" --output tsv | grep -q '.' \ || echo "WARN: storage account Properties is empty"
Type guard
// guard populateAccountDetails against a nil Properties
func hasProperties(a storageaccounts.StorageAccount) bool {
return a.Properties != nil
} Prevention
- Keep the terraform/SDK version aligned with the target cloud.
- Retry once for transient ARM inconsistency.
- Report persistent nil-Properties responses with account details.
When it happens
Trigger: ARM GET on the storage account returns a model whose Properties field is nil, which the populate function cannot process.
Common situations: API-version skew between the bundled go-azure-sdk and the cloud; partial or error responses; sovereign/private cloud returning a reduced shape.
Related errors
- retrieving key for Storage Account %q: %s
- listing Keys for %s: %+v
- unable to determine the Write Key for %s
- populating details for %s: `model.Properties.PrimaryEndpoint
- retrieving %s: model was nil
AI-assisted analysis of hashicorp/terraform@c9def3e214 (2026-08-07).
Data as JSON: /api/errors/13054c6eadeb1d58.
Report an issue: GitHub.