Environment variables vs secrets
Tinfoil Containers supports two kinds of configuration values:| Stored in | Visible to | Set via | Use for | |
|---|---|---|---|---|
| Environment variables | tinfoil-config.yml (in your repo) | Anyone with repo access | Config file | Non-sensitive config (ports, log levels, feature flags) |
| Secrets | Encrypted storage (AWS Secrets Manager) | Tinfoil infrastructure, no public access | Declared in config, set in dashboard only | Sensitive values (API keys, database URLs, tokens) |
Environment variables and secrets must be declared in the config. Env var values are set in the config file; secret values are set in the dashboard.
Environment variables
In your config file
Define environment variables in theenv field of your container spec:
tinfoil-config.yml
In the dashboard
During deployment, the dashboard displays the environment variables (and secret names) defined in yourtinfoil-config.yml. These values are read-only. To change them, update the config file in your repo and push a new tag.
Secrets
Secrets are stored in AWS Secrets Manager and injected into your container as environment variables at deploy time. They are not exposed in the dashboard UI or your Git repository, but they are accessible to Tinfoil’s infrastructure during deployment.Secrets are not protected by the enclave’s confidentiality boundary. They pass through the host on their way into the container. If your threat model requires that Tinfoil cannot access certain values, those values should be encrypted application-side before storing them as secrets.
Creating secrets
- Go to the Secrets tab in the Containers section of the dashboard
- Click Add Secret
- Enter a name (e.g.
DATABASE_URL) and value - Click Save
Referencing secrets in config
List secret names in thesecrets field of your container spec. The values are pulled from your org’s secret store at deploy time:
tinfoil-config.yml

