The Clutch binary will consume
clutch-config.yaml in the current working directory by default.
To use a different path for the configuration,use the
-c option, e.g.
Clutch supports the expansion of environment variables after reading the YAML when the gateway starts up.
All backend configuration in Clutch is specified in protobuf definitions. For information on how YAML and JSON map to protobuf see Language Guide (proto3): JSON Mapping.
Note: it is recommended to write YAML long-form, the format of the examples below are shortened for documentation purposes.
Modules, resolvers, and service are all specified using the same format. The name of the component is specified, and if necessary the config is provided via the
Any type in the
See comments in any.proto from the protobuf project for additional documentation.
clutch.service.authn and environment variables.
The Clutch frontend requires configuration at build time to determine which installed workflows to register and allows for users to override default values.
A custom gateway generated from the scaffolding tool will have a
register-workflows script target in
frontend/package.json. This script calls out to
@clutch-sh/tools to parse the custom gateway's config file and register the found workflows. It expects the frontend config file at the path
In the configuration above there are some open source workflows registered, in this case with overrides for their
trending values. Notice how these workflows also have a
componentProps field specified. Some workflows will require prop values that are specific to the user. Without them the workflow will not register on the app even if listed in the config file. Take the
@clutch-sh/ec2 package as an example; both the
resizeAutoscalingGroup workflows require a
If a config is invalid a warning will be emitted in the console denoting which workflow is misconfigured along with the which required props are missing, for example:
It's important to note that only packages which are installed will be included, even if they are listed in the config file.