{"record":{"id":"894f4591fbd46760","repo":"hashicorp/nomad","slug":"consul-terminating-gateway-requires-at-least-one-s","errorCode":null,"errorMessage":"Consul Terminating Gateway requires at least one service","messagePattern":"Consul Terminating Gateway requires at least one service","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/services.go","lineNumber":2696,"sourceCode":"\t\tServices: services,\n\t}\n}\n\nfunc (e *ConsulTerminatingConfigEntry) Equal(o *ConsulTerminatingConfigEntry) bool {\n\tif e == nil || o == nil {\n\t\treturn e == o\n\t}\n\n\treturn linkedServicesEqual(e.Services, o.Services)\n}\n\nfunc (e *ConsulTerminatingConfigEntry) Validate() error {\n\tif e == nil {\n\t\treturn nil\n\t}\n\n\tif len(e.Services) == 0 {\n\t\treturn fmt.Errorf(\"Consul Terminating Gateway requires at least one service\")\n\t}\n\n\tfor _, service := range e.Services {\n\t\tif err := service.Validate(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\n// ConsulMeshConfigEntry is a stub used to represent that the gateway service\n// type should be for a Mesh Gateway. Unlike Ingress and Terminating, there is no\n// dedicated Consul Config Entry type for \"mesh-gateway\", for now. We still\n// create a type for future proofing, and to keep underlying job-spec marshaling\n// consistent with the other types.\ntype ConsulMeshConfigEntry struct {\n\t// nothing in here","sourceCodeStart":2678,"sourceCodeEnd":2714,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/services.go#L2678-L2714","documentation":"ConsulTerminatingConfigEntry.Validate found an empty Services list on a terminating gateway. A terminating gateway must link to at least one upstream Consul service it can proxy for mesh workloads.","triggerScenarios":"Thrown at nomad/structs/services.go:2696 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add one or more service blocks naming the linked Consul services"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}