hashicorp/terraform · error
State store provider %q (%s) was not approved, so init canno
Error message
State store provider %q (%s) was not approved, so init cannot continue.
What it means
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.
Source
Thrown at internal/command/meta_backend.go:3239
Hashes:
%s
`,
lock.Provider().Type,
lock.Provider(),
lock.Version(),
getproviders.CurrentPlatform.String(),
authentication,
hashList.String(),
),
Description: fmt.Sprintf(`Check the details above for provider %q and confirm that you trust the provider.
Only 'yes' will be accepted to confirm.`, lock.Provider().Type),
})
if err != nil {
return diags.Append(fmt.Errorf("Failed to approve use of state storage provider: %s", err))
}
if v != "yes" {
return diags.Append(
fmt.Errorf("State store provider %q (%s) was not approved, so init cannot continue.",
lock.Provider().Type,
lock.Provider(),
),
)
}
return diags
}
//-------------------------------------------------------------------
// Output constants and initialization code
//-------------------------------------------------------------------
const inputCloudInitCreateWorkspace = `
There are no workspaces with the configured tags (%s)
in your HCP Terraform organization. To finish initializing, Terraform needs at
least one workspace available.
Terraform can create a properly tagged workspace for you now. Please enter aView on GitHub (pinned to c9def3e214)
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.
Example fix
// before: prompt answered 'y' -> 'State store provider ... was not approved, so init cannot continue.' // after: re-run and answer exactly: yes
Defensive patterns
Strategy: validation
Validate before calling
// If automating, ensure the approval input is exactly 'yes' or pre-approve via lock file.
func approvalInputValid(v string) bool { return v == "yes" } Prevention
- 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.
When it happens
Trigger: 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.
Common situations: A cautious operator declining an untrusted provider; automation accidentally sending 'y' or a newline; a misconfigured wrapper auto-answering prompts incorrectly.
Related errors
- Failed to approve use of state storage provider: %s
- error when obtaining provider instance during state store in
- Failed obtain the in-use version of provider %s (%q) used wi
- Failed to negotiate acceptable chunk size. Expected size > 0
- error when obtaining provider instance during state store in
AI-assisted analysis of hashicorp/terraform@c9def3e214 (2026-08-07).
Data as JSON: /api/errors/3fb53880a0a206fa.
Report an issue: GitHub.