{"record":{"id":"ef1e5b18e8b3fc94","repo":"hashicorp/nomad","slug":"non-default-consul-cluster-requires-nomad-enterpri","errorCode":null,"errorMessage":"non-default Consul cluster requires Nomad Enterprise","messagePattern":"non-default Consul cluster requires Nomad Enterprise","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/job_endpoint_hook_consul_ce.go","lineNumber":62,"sourceCode":"\t\t\tif task.Consul != nil {\n\t\t\t\terr := h.validateTaskPartitionMatchesGroup(groupPartition, task.Consul)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\t\tif err := h.validateCluster(task.Consul.Cluster); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil, nil\n}\n\nfunc (h jobConsulHook) validateCluster(name string) error {\n\tif name != structs.ConsulDefaultCluster {\n\t\treturn errors.New(\"non-default Consul cluster requires Nomad Enterprise\")\n\t}\n\treturn nil\n}\n\n// Mutate ensures that the job's Consul cluster has been configured to be the\n// default Consul cluster if unset\nfunc (h jobConsulHook) Mutate(job *structs.Job) (*structs.Job, []error, error) {\n\treturn h.mutateImpl(job, structs.ConsulDefaultCluster), nil, nil\n}\n","sourceCodeStart":44,"sourceCodeEnd":72,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/job_endpoint_hook_consul_ce.go#L44-L72","documentation":"In Nomad open source (CE), jobs may only use the default Consul cluster. The CE jobConsulHook's validateCluster returns this error when a job references any consul cluster name other than \"default\"; multi-cluster Consul is a Nomad Enterprise feature.","triggerScenarios":"Setting `consul { cluster = \"<name>\" }` on a group (or job-level namespace cluster config) with a non-default value and validating/submitting the job on a CE binary.","commonSituations":"Copying an Enterprise job file to an OSS cluster; experimenting with multi-cluster consul config locally without the Enterprise license.","solutions":["Remove the `cluster` field from the job's consul block so it defaults to \"default\".","Upgrade to Nomad Enterprise if multi-Consul-cluster is genuinely needed.","Point the agent's own consul configuration at the desired cluster instead of per-job overrides."],"exampleFix":"// before\nconsul {\n  cluster = \"staging\"\n}\n\n// after\nconsul {}","handlingStrategy":"validation","validationCode":"if group.Consul != nil && group.Consul.Cluster != \"\" && group.Consul.Cluster != \"default\" {\n  return errors.New(\"requires Nomad Enterprise\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Omit consul.cluster on OSS clusters","Check edition/licensing before using multi-cluster features","Validate job specs against the target cluster edition"],"tags":["nomad","consul","enterprise-only","job-validation"],"backgroundTag":"nomad-enterprise-feature-required","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}