{"record":{"id":"241acdadeb158434","repo":"hashicorp/terraform","slug":"retrieving-s-v","errorCode":null,"errorMessage":"retrieving %s: %+v","messagePattern":"retrieving (.+?): %\\+v","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backend/remote-state/azure/api_client.go","lineNumber":106,"sourceCode":"\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif config.SubscriptionID == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"subscription id not specified\")\n\t\t}\n\n\t\t// Setup the SA client.\n\t\tclient.storageAccountsClient, err = storageaccounts.NewStorageAccountsClientWithBaseURI(config.AuthConfig.Environment.ResourceManager)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"building Storage Accounts client: %+v\", err)\n\t\t}\n\t\tclient.configureClient(client.storageAccountsClient.Client, resourceManagerAuth)\n\n\t\t// Populating the storage account detail\n\t\tstorageAccountId := commonids.NewStorageAccountID(config.SubscriptionID, config.ResourceGroupName, client.storageAccountName)\n\t\tresp, err := client.storageAccountsClient.GetProperties(ctx, storageAccountId, storageaccounts.DefaultGetPropertiesOperationOptions())\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"retrieving %s: %+v\", storageAccountId, err)\n\t\t}\n\t\tif resp.Model == nil {\n\t\t\treturn nil, fmt.Errorf(\"retrieving %s: model was nil\", storageAccountId)\n\t\t}\n\t\tclient.accountDetail, err = populateAccountDetails(storageAccountId, *resp.Model)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"populating details for %s: %+v\", storageAccountId, err)\n\t\t}\n\t}\n\n\treturn &client, nil\n}\n\nfunc (c *Client) getBlobClient(ctx context.Context) (bc *blobs.Client, err error) {\n\tif c.blobsClient != nil {\n\t\treturn c.blobsClient, nil\n\t}\n","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/hashicorp/terraform/blob/c9def3e214014c1188faabfc4a5bde5095139765/internal/backend/remote-state/azure/api_client.go#L88-L124","documentation":"Returned by buildClient when client.storageAccountsClient.GetProperties fails to retrieve the Storage Account via the ARM API. The %s is the full resource ID (subscription/resource-group/account) and %+v is the ARM error. This is the actual remote GET against the storage account resource.","triggerScenarios":"ARM auth and client construction succeeded, but the GetProperties call for the storage account fails — account doesn't exist, wrong resource group, RBAC denies the read, throttled, or transient network failure. Triggered during terraform init when lookup_blob_endpoint is needed.","commonSituations":"Typo in storage_account_name or resource_group_name; the principal has no 'Reader' access to the storage account; subscription mismatch; account deleted; ARM throttling; transient outage.","solutions":["Verify storage_account_name and resource_group_name are correct and the account exists in the subscription.","Grant the service principal 'Reader' (or Storage Account Contributor) on the storage account/resource group.","Retry on transient/network errors; check Azure status for outages."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Confirm the account exists and is readable before init.\n// (Run 'az storage account show -g <rg> -n <acct>' as a pre-flight check.)","typeGuard":null,"tryCatchPattern":"client, err := buildClient(ctx, config)\nif err != nil && strings.Contains(err.Error(), \"retrieving\") {\n    // likely wrong name/rg/RBAC; verify names and permissions\n}","preventionTips":["Double-check storage_account_name and resource_group_name spelling and subscription.","Grant the principal Reader/Storage Account Contributor before terraform init.","Retry transient ARM errors; check Azure status for outages."],"tags":["azure","backend","resource-manager","storage-account","rbac","network","terraform"],"analyzedSha":"c9def3e214014c1188faabfc4a5bde5095139765","analyzedAt":"2026-08-07T15:39:49.278Z","schemaVersion":2},"datasetVersion":"2026-08-07T20:17:04.800Z"}