{"record":{"id":"3fb53880a0a206fa","repo":"hashicorp/terraform","slug":"state-store-provider-q-s-was-not-approved-so","errorCode":null,"errorMessage":"State store provider %q (%s) was not approved, so init cannot continue.","messagePattern":"State store provider %q \\((.+?)\\) was not approved, so init cannot continue\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/command/meta_backend.go","lineNumber":3239,"sourceCode":"Hashes:\n%s\n`,\n\t\t\tlock.Provider().Type,\n\t\t\tlock.Provider(),\n\t\t\tlock.Version(),\n\t\t\tgetproviders.CurrentPlatform.String(),\n\t\t\tauthentication,\n\t\t\thashList.String(),\n\t\t),\n\t\tDescription: fmt.Sprintf(`Check the details above for provider %q and confirm that you trust the provider.\n\tOnly 'yes' will be accepted to confirm.`, lock.Provider().Type),\n\t})\n\tif err != nil {\n\t\treturn diags.Append(fmt.Errorf(\"Failed to approve use of state storage provider: %s\", err))\n\t}\n\tif v != \"yes\" {\n\t\treturn diags.Append(\n\t\t\tfmt.Errorf(\"State store provider %q (%s) was not approved, so init cannot continue.\",\n\t\t\t\tlock.Provider().Type,\n\t\t\t\tlock.Provider(),\n\t\t\t),\n\t\t)\n\t}\n\treturn diags\n}\n\n//-------------------------------------------------------------------\n// Output constants and initialization code\n//-------------------------------------------------------------------\n\nconst inputCloudInitCreateWorkspace = `\nThere are no workspaces with the configured tags (%s)\nin your HCP Terraform organization. To finish initializing, Terraform needs at\nleast one workspace available.\n\nTerraform can create a properly tagged workspace for you now. Please enter a","sourceCodeStart":3221,"sourceCodeEnd":3257,"githubUrl":"https://github.com/hashicorp/terraform/blob/c9def3e214014c1188faabfc4a5bde5095139765/internal/command/meta_backend.go#L3221-L3257","documentation":"In Meta.promptStateStorageProviderApproval (meta_backend.go:3239), the approval prompt was answered but the response was not exactly 'yes'. Because state-storage providers hold your state, Terraform requires explicit confirmation; anything other than 'yes' aborts init. This is an intentional user-decline, not a system error.","triggerScenarios":"The user typed anything other than 'yes' (including 'y', 'Y', 'yes ', blank, or a typo) at the 'Do you want to use provider ... for managing state?' prompt; pressing Enter/Escape; input being auto-fed a non-'yes' value in automation.","commonSituations":"A cautious operator declining an untrusted provider; automation accidentally sending 'y' or a newline; a misconfigured wrapper auto-answering prompts incorrectly.","solutions":["Re-run init and type exactly 'yes' if you intend to approve the provider after verifying its version/hashes.","Verify the provider type, version, platform, authentication, and hashes shown in the prompt are what you expect before approving.","If you do not trust this provider, change your state_store block to a trusted provider instead.","Ensure any automation that feeds input sends the literal string 'yes' (case-sensitive) or pre-approve via the lock file."],"exampleFix":"// before: prompt answered 'y'  -> 'State store provider ... was not approved, so init cannot continue.'\n// after: re-run and answer exactly: yes","handlingStrategy":"validation","validationCode":"// If automating, ensure the approval input is exactly 'yes' or pre-approve via lock file.\nfunc approvalInputValid(v string) bool { return v == \"yes\" }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Answer the approval prompt with exactly 'yes' (case-sensitive).","Verify provider type/version/platform/hashes before approving.","If you do not trust the provider, switch to a trusted one in the state_store block.","Ensure automation sends the literal 'yes' or pre-approves via the lock file."],"tags":["state-store","provider","trust","interactive","init"],"analyzedSha":"c9def3e214014c1188faabfc4a5bde5095139765","analyzedAt":"2026-08-07T15:39:49.278Z","schemaVersion":2},"datasetVersion":"2026-08-07T20:17:04.800Z"}