HashiCorp Consul · Schema
Consul Service Definition
Schema for a service definition registered with the Consul agent or catalog.
ACLConfigurationHealth CheckingKey/Value StoreMulti-DatacenterOpen SourceService DiscoveryService Mesh
Properties
| Name | Type | Description |
|---|---|---|
| ID | string | |
| Name | string | |
| Tags | array | |
| Address | string | |
| TaggedAddresses | object | |
| Meta | object | |
| Port | integer | |
| Kind | string | |
| Proxy | object | |
| Connect | object | |
| Weights | object | |
| Check | object | |
| Checks | array | |
| EnableTagOverride | boolean | |
| Namespace | string | |
| Partition | string |
JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/api-evangelist/consul/refs/heads/main/json-schema/consul-service-schema.json",
"title": "Consul Service Definition",
"description": "Schema for a service definition registered with the Consul agent or catalog.",
"type": "object",
"properties": {
"ID": { "type": "string" },
"Name": { "type": "string" },
"Tags": {
"type": "array",
"items": { "type": "string" }
},
"Address": { "type": "string" },
"TaggedAddresses": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"Address": { "type": "string" },
"Port": { "type": "integer" }
}
}
},
"Meta": {
"type": "object",
"additionalProperties": { "type": "string" }
},
"Port": { "type": "integer", "minimum": 1, "maximum": 65535 },
"Kind": {
"type": "string",
"enum": ["", "connect-proxy", "mesh-gateway", "ingress-gateway", "terminating-gateway"]
},
"Proxy": { "type": "object" },
"Connect": { "type": "object" },
"Weights": {
"type": "object",
"properties": {
"Passing": { "type": "integer" },
"Warning": { "type": "integer" }
}
},
"Check": { "$ref": "#/definitions/HealthCheck" },
"Checks": {
"type": "array",
"items": { "$ref": "#/definitions/HealthCheck" }
},
"EnableTagOverride": { "type": "boolean" },
"Namespace": { "type": "string" },
"Partition": { "type": "string" }
},
"required": ["Name"],
"definitions": {
"HealthCheck": {
"type": "object",
"properties": {
"CheckID": { "type": "string" },
"Name": { "type": "string" },
"Notes": { "type": "string" },
"Status": {
"type": "string",
"enum": ["passing", "warning", "critical", "maintenance"]
},
"HTTP": { "type": "string", "format": "uri" },
"TCP": { "type": "string" },
"gRPC": { "type": "string" },
"Method": { "type": "string" },
"Header": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": { "type": "string" }
}
},
"TLSSkipVerify": { "type": "boolean" },
"Interval": { "type": "string" },
"Timeout": { "type": "string" },
"DeregisterCriticalServiceAfter": { "type": "string" }
}
}
}
}