Configuration File
Edge uses a JSON configuration file. Pass the path as the first argument:Full Example
config.json
Any string value can reference an environment variable with
${VAR} (for
example ${TERO_API_TOKEN}). See Environment
Variables.Configuration Reference
Edge supports up to 8,000 policies. Open an issue on
GitHub if you need more.
Server Settings
Upstream Settings
Service Settings
Theservice object identifies this Edge instance to the control plane and
attaches metadata to policy sync requests. Always set name, namespace, and
version — the control plane uses them to scope and match policies to this
service. resource_attributes and labels are optional but recommended.
instance_id is generated at startup and is not configurable.Policy Providers
Thepolicy_providers array configures where Edge loads policies from.
File Provider
Loads policies from a local file and watches for changes.
Edge watches the file with inotify (Linux) or kqueue (macOS) and applies changes
on save.
HTTP Provider
Loads policies from an HTTP endpoint with periodic polling.Prometheus Settings
The optionalprometheus object bounds memory use when filtering Prometheus
scrapes (relevant to distributions that handle metrics).
Policy File Format
Define policies in a JSON file:policies.json
Environment Variables
Edge reads environment variables two ways.Value Substitution
Any string value in the config file can reference an environment variable with${VAR}. The variable is resolved when the config loads:
- Unset variables resolve to an empty string.
- Use
$${VAR}to emit a literal${VAR}without substitution.
Field Overrides
ATERO_-prefixed environment variable overrides the matching config field. The
name is the field path in SCREAMING_SNAKE_CASE, with nested fields joined by
_, so service.namespace becomes TERO_SERVICE_NAMESPACE. Overrides are
applied after the file is parsed, so they always win over it.
Defaults above are the built-in ones. Each distribution image bakes a
config.json that already changes some of them — edge-datadog, for example,
ships listen_address: 0.0.0.0, service.namespace: production, and a
Datadog US1 upstream_url. Env vars override whichever value the file set.- Optional fields accept an empty string to mean “unset”.
TERO_METRICS_URL=setsmetrics_urlback to null rather than to an empty URL. - An unparseable value fails startup.
TERO_LOG_LEVEL=bogusor a non-numericTERO_LISTEN_PORTexits withconfig.load.error err="InvalidValue"instead of silently falling back to the default. - Lists are not overridable.
policy_providers,service.resource_attributes, andservice.labelsare arrays, so they have no env var — supply a config file, or use value substitution for the strings inside it. Setting aTERO_variable that matches no field is silently ignored, so a typo fails quietly. service.instance_idandservice.supported_stagesare ignored. Both are set by the runtime at startup — the instance ID is generated per process, and the supported stages come from the distribution.
Other Environment Variables
These are read directly rather than as config-field overrides:Next Steps
Operations
Logging, health checks, and resource requirements
Log Filtering
Configure log filtering policies