hashicorp/nomad · error
invalid enforcement %q
Error message
invalid enforcement %q
What it means
NodeIntroductionConfig.Validate found an Enforcement value outside the allowed set (none, warn, strict); the multierror records the invalid enum value.
Source
Thrown at nomad/structs/node.go:931
newCI := *n
return &newCI
}
// Validate checks that the node introduction configuration is valid.
func (n *NodeIntroductionConfig) Validate() error {
if n == nil {
return fmt.Errorf("cannot be empty")
}
var mErr *multierror.Error
switch n.Enforcement {
case NodeIntroductionEnforcementNone,
NodeIntroductionEnforcementWarn,
NodeIntroductionEnforcementStrict:
default:
mErr = multierror.Append(mErr, fmt.Errorf("invalid enforcement %q", n.Enforcement))
}
if n.DefaultIdentityTTL < 1 {
mErr = multierror.Append(mErr, errors.New("default_identity_ttl must be greater than 0"))
}
if n.MaxIdentityTTL < 1 {
mErr = multierror.Append(mErr, errors.New("max_identity_ttl must be greater than 0"))
}
if n.MaxIdentityTTL < n.DefaultIdentityTTL {
mErr = multierror.Append(mErr, errors.New(
"max_identity_ttl must be greater than or equal to default_identity_ttl",
))
}
return mErr.ErrorOrNil()
}View on GitHub (pinned to 482b49bf1a)
Solutions
- Set enforcement to one of "none", "warn", or "strict"
- Remove the invalid value to use the default
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at nomad/structs/node.go:931 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/97be0fcc428e1f16.
Report an issue: GitHub.