hashicorp/terraform · critical

This run has no required providers information provided at a

Error message

This run has no required providers information provided at all. This is a bug in Terraform and should be reported.

What it means

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.

Source

Thrown at internal/configs/state_store.go:158

		// This code path is used for both re-attached providers
		// providers that are fully managed by Terraform.
		return addr.Type, nil
	}
}

// VerifyDependencySelection checks whether the provider used for state storage has a valid version in the
// dependency lock file that matches the constraints in required_providers.
// There is also special handling for providers that cannot be represented in the lock file (built-in providers, dev overrides)
// and also special handling when the provider is re-attached and not managed by Terraform.
func (ss *StateStore) VerifyDependencySelection(depLocks *depsfile.Locks, reqs *RequiredProviders, supplyMode getproviders.ProviderSupplyMode) tfdiags.Diagnostics {
	var diags tfdiags.Diagnostics

	// If we get nil arguments it suggests that there's a bug in the calling code.
	if depLocks == nil {
		panic("This run has no dependency lock information provided at all. This is a bug in Terraform and should be reported.")
	}
	if reqs == nil {
		panic("This run has no required providers information provided at all. This is a bug in Terraform and should be reported.")
	}

	if supplyMode.NotManagedByTerraform() {
		// If the provider is not managed by Terraform then it's not lockable.
		// If the working directory was initialized in the same way then the PSS provider will not be reflected in the lock file.
		// Skip them.
		switch supplyMode {
		case getproviders.BuiltIn:
			log.Printf("[DEBUG] StateStore.VerifyDependencySelection: skipping %s because it's a built-in provider", ss.ProviderAddr)
		case getproviders.DevOverride:
			log.Printf("[DEBUG] StateStore.VerifyDependencySelection: skipping %s because it's supplied via developer overrides", ss.ProviderAddr)
		case getproviders.Reattached:
			log.Printf("[DEBUG] StateStore.VerifyDependencySelection: skipping %s because it's re-attached and not managed by Terraform", ss.ProviderAddr)
		default:
			panic(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))
		}
		return diags
	}

View on GitHub (pinned to c9def3e214)

Solutions

  1. Report as a Terraform bug: include the .tf config (especially the state_store and required_providers blocks) and the exact version/commit.
  2. Reproduce on the latest stable Terraform to confirm it is a real regression vs a fork issue.
  3. As a workaround, ensure required_providers is explicitly declared in the configuration.
  4. Downgrade to the last known-good Terraform version if blocking work.

Example fix

null
Defensive patterns

Strategy: try-catch

Validate before calling

// Go (internal caller): never pass nil reqs to VerifyDependencySelection
if reqs == nil {
    reqs = configs.NewEmptyRequiredProviders()
}
ss.VerifyDependencySelection(depLocks, reqs, supplyMode)

Type guard

// Go: guard the precondition
func nonNilRequiredProviders(r *configs.RequiredProviders) bool { return r != nil && r.RequiredProviders != nil }

Try / catch

// Go: isolate the panic in internal wiring
defer func() {
	if r := recover(); r != nil {
		diags = diags.Append(fmt.Errorf("internal error during state-store dependency check: %v", r))
	}
}()
ss.VerifyDependencySelection(depLocks, reqs, supplyMode)

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of hashicorp/terraform@c9def3e214 (2026-08-07). Data as JSON: /api/errors/0f1641921b92c0fd. Report an issue: GitHub.