Store all your sensitive inputs (API keys, passwords etc) as
secrets.
env: sections of the manifest.
For example, here is how to add a variable that will be visible only to the squid processor:
squid.yaml
squid.yaml
API_KEY variable and populate it with the value of secrets.API_KEY, do this:
squid.yaml
Variable shadowing
There is one special case in which the variables defined in the manifest will get overwritten by the Cloud: database connection settings are shadowed by the system-defined values whenever thepostgres addon is enabled (see the Variable shadowing section of the addon page). For example, in the snippet below all the DB_* variable definitions will be ignored:
squid.yaml
Contexts
The Cloud exposes some useful variables via a mechanism identical to GitHub Actions contexts. Namely, any stringSecrets
Secrets are designed to store sensitive data, such as API keys or private URLs for chain RPC endpoints. They are defined at the organization level and are exposed to all organization squids that request them in their environment variable definitions. To add a secret:- Create it in the Cloud. You can do it at the secrets page or with
sqd secrets:
sqd will attempt to read it from standard input. This is useful when setting a value to the contents of some file:
- At your squid’s manifest, add an environment variable and assign it to the secret:
Note: a deployment requesting a secret unknown to the Cloud will fail.
- Access the value in the squid with
process.env, e.g.Inspect, remove and update the secrets using thesqd secretscommand.
Any changes to secrets will take effect only when the squid is restarted, e.g.
with
bash sqd deploy .