hashicorp/nomad · error

custom plugin provider %s cannot use the config block

Error message

custom plugin provider %s cannot use the config block

What it means

Secret block validation error: a custom plugin provider is configured with a config block. The config map is only meaningful for the built-in nomad/vault providers; plugin secrets take no inline config.

Source

Thrown at nomad/structs/structs.go:10652

	if !validSecretName.MatchString(s.Name) {
		_ = multierror.Append(&mErr, fmt.Errorf("secret name must match regex %s", validSecretName))
	}

	if s.Provider == "" {
		_ = multierror.Append(&mErr, errors.New("secret provider cannot be empty"))
	}

	if s.Path == "" {
		_ = multierror.Append(&mErr, errors.New("secret path cannot be empty"))
	}

	if s.Provider == "nomad" || s.Provider == "vault" {
		if len(s.Env) > 0 {
			_ = multierror.Append(&mErr, fmt.Errorf("%s provider cannot use the env block", s.Provider))
		}
	} else {
		if len(s.Config) > 0 {
			_ = multierror.Append(&mErr, fmt.Errorf("custom plugin provider %s cannot use the config block", s.Provider))
		}
	}

	return mErr.ErrorOrNil()
}

func (s *Secret) Canonicalize() {
	if s == nil {
		return
	}

	if len(s.Config) == 0 {
		s.Config = nil
	}
}

// RescheduleTracker encapsulates previous reschedule events
type RescheduleTracker struct {

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Remove the config block from the secret stanza
  2. Move provider-specific settings into the plugin's own configuration
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at nomad/structs/structs.go:10652 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04). Data as JSON: /api/errors/794f6167e21037cd. Report an issue: GitHub.