{"record":{"id":"0f1641921b92c0fd","repo":"hashicorp/terraform","slug":"this-run-has-no-required-providers-information-pro","errorCode":null,"errorMessage":"This run has no required providers information provided at all. This is a bug in Terraform and should be reported.","messagePattern":"This run has no required providers information provided at all\\. This is a bug in Terraform and should be reported\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"internal/configs/state_store.go","lineNumber":158,"sourceCode":"\t\t// This code path is used for both re-attached providers\n\t\t// providers that are fully managed by Terraform.\n\t\treturn addr.Type, nil\n\t}\n}\n\n// VerifyDependencySelection checks whether the provider used for state storage has a valid version in the\n// dependency lock file that matches the constraints in required_providers.\n// There is also special handling for providers that cannot be represented in the lock file (built-in providers, dev overrides)\n// and also special handling when the provider is re-attached and not managed by Terraform.\nfunc (ss *StateStore) VerifyDependencySelection(depLocks *depsfile.Locks, reqs *RequiredProviders, supplyMode getproviders.ProviderSupplyMode) tfdiags.Diagnostics {\n\tvar diags tfdiags.Diagnostics\n\n\t// If we get nil arguments it suggests that there's a bug in the calling code.\n\tif depLocks == nil {\n\t\tpanic(\"This run has no dependency lock information provided at all. This is a bug in Terraform and should be reported.\")\n\t}\n\tif reqs == nil {\n\t\tpanic(\"This run has no required providers information provided at all. This is a bug in Terraform and should be reported.\")\n\t}\n\n\tif supplyMode.NotManagedByTerraform() {\n\t\t// If the provider is not managed by Terraform then it's not lockable.\n\t\t// If the working directory was initialized in the same way then the PSS provider will not be reflected in the lock file.\n\t\t// Skip them.\n\t\tswitch supplyMode {\n\t\tcase getproviders.BuiltIn:\n\t\t\tlog.Printf(\"[DEBUG] StateStore.VerifyDependencySelection: skipping %s because it's a built-in provider\", ss.ProviderAddr)\n\t\tcase getproviders.DevOverride:\n\t\t\tlog.Printf(\"[DEBUG] StateStore.VerifyDependencySelection: skipping %s because it's supplied via developer overrides\", ss.ProviderAddr)\n\t\tcase getproviders.Reattached:\n\t\t\tlog.Printf(\"[DEBUG] StateStore.VerifyDependencySelection: skipping %s because it's re-attached and not managed by Terraform\", ss.ProviderAddr)\n\t\tdefault:\n\t\t\tpanic(fmt.Sprintf(\"State store provider %q (%s) has unknown supply mode %q. This is a bug in Terraform and should be reported.\", ss.ProviderAddr.Type, ss.ProviderAddr.ForDisplay(), supplyMode))\n\t\t}\n\t\treturn diags\n\t}","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/hashicorp/terraform/blob/c9def3e214014c1188faabfc4a5bde5095139765/internal/configs/state_store.go#L140-L176","documentation":"A panic in `StateStore.VerifyDependencySelection` (internal/configs/state_store.go:158) when the `reqs` (RequiredProviders) argument passed by calling code is nil. The function treats nil required-providers as an internal calling bug, not a config error, and panics asking the user to report it. By the time this runs, configuration parsing should always have produced a non-nil RequiredProviders object.","triggerScenarios":"Internal call path where the caller fails to construct or pass the RequiredProviders structure into VerifyDependencySelection. Not reachable through normal configuration authoring; reachable only via a regression in Terraform's own wiring (e.g. a code path that skips building required providers when a state_store block is present).","commonSituations":"A new/patched Terraform build with a bug in how required_providers is threaded to the state-store verification step; typically seen in development builds or forks, rarely in released versions.","solutions":["Report as a Terraform bug: include the .tf config (especially the state_store and required_providers blocks) and the exact version/commit.","Reproduce on the latest stable Terraform to confirm it is a real regression vs a fork issue.","As a workaround, ensure required_providers is explicitly declared in the configuration.","Downgrade to the last known-good Terraform version if blocking work."],"exampleFix":"null","handlingStrategy":"try-catch","validationCode":"// Go (internal caller): never pass nil reqs to VerifyDependencySelection\nif reqs == nil {\n    reqs = configs.NewEmptyRequiredProviders()\n}\nss.VerifyDependencySelection(depLocks, reqs, supplyMode)","typeGuard":"// Go: guard the precondition\nfunc nonNilRequiredProviders(r *configs.RequiredProviders) bool { return r != nil && r.RequiredProviders != nil }","tryCatchPattern":"// Go: isolate the panic in internal wiring\ndefer func() {\n\tif r := recover(); r != nil {\n\t\tdiags = diags.Append(fmt.Errorf(\"internal error during state-store dependency check: %v\", r))\n\t}\n}()\nss.VerifyDependencySelection(depLocks, reqs, supplyMode)","preventionTips":["Treat this as a Terraform bug: report with full config and version.","Always declare required_providers explicitly when using state_store.","Reproduce on the latest stable Terraform before reporting.","Keep CI on a known-good Terraform version and upgrade deliberately."],"tags":["terraform","state-store","provider-state-store","panic","required-providers","internal-bug"],"analyzedSha":"c9def3e214014c1188faabfc4a5bde5095139765","analyzedAt":"2026-08-07T15:39:49.278Z","schemaVersion":2},"datasetVersion":"2026-08-07T21:17:07.882Z"}