What to use when
Tinfoil Containers supports two different kinds of configuration values:| Environment variables | Secrets | |
|---|---|---|
| Stored in | tinfoil-config.yml (in your repo) | Encrypted storage (AWS Secrets Manager) |
| Visible to | Anyone with repo access | Tinfoil infrastructure, no public access |
| Set via | Config file | Declared in config, set in dashboard only |
| Use for | Non-sensitive config (ports, log levels, feature flags) | Sensitive values (API keys, database URLs, tokens) |
Environment variables and secrets are both declared in the config. Env var values are also set in the config file; secret values are set in the dashboard.
Environment variables
Config File
Define environment variables in theenv field of your container configuration file:
tinfoil-config.yml
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 release a new version via the Tinfoil Release workflow.
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.Creating
- 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
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
Updating
Edit a secret’s value in the Secrets tab at any time. Updating a secret does not automatically update running containers. To pick up the new value you must redeploy. Redeployment uses the blue-green flow, so there’s no downtime.Deleting
You cannot delete a secret that is referenced by any container. The dashboard shows which containers are using it. Delete all deployments that are currently using the secret, then delete the secret.Using the CLI
The Tinfoil CLI manages secrets through the same vault:--secret NAME on tinfoil container create, relaunch, or start. See the CLI secrets section for details.
