Add Env Var Interpolation Support #246
Closed
Lailanater
started this conversation in
Ideas
Replies: 3 comments 1 reply
|
Another example that abstracts over different container registries on dev and prod environments: [secrets]
CI_BOT_TOKEN = { provider = "age", value = "..." }
[profiles.dev.secrets]
CONTAINER_REGISTRY = { default = "registry.gitlab.com" }
CONTAINER_REGISTRY_USER = { default = "ci" }
CONTAINER_REGISTRY_PASSWORD = { default = "$CI_BOT_TOKEN" } # <-- Doesn't work currently
[profiles.production.secrets]
CONTAINER_REGISTRY = { default = "registry.company.ru:1234" }
CONTAINER_REGISTRY_USER = { default = "prod" }
CONTAINER_REGISTRY_PASSWORD = { provider = "age", value="..." } |
1 reply
|
Second this. This is very common practice. Sometimes we override username, and password only with the profile. But the URL builder is same for all profiles. |
0 replies
|
Implemented this in PR #549: #549 The PR adds This comment was AI-generated. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Given the following
fnox.tomlfile the environment variableDATABASE_URLwill be partially resolvedWith an output like this:

The
DATABASE_URLwould only includePOSTGRES_USERandPOSTGRES_DBsince they were resolved beforeDATABASE_URLAll reactions