#Default secrets to environment variable

1 messages · Page 1 of 1 (latest)

chilly salmon
#

I have a bunch of functions that use a good number of environment variables for secrets. A bunch of these are just credentials and similar information that will always be available in a he different environments we will run dagger from.

I was trying to figure out if there was a way to just always get the secret from the specified environment variable and not have to pass it in as an argument to the function/module.

I have tried a number of ways and it doesn’t seem to be possible to get the host environment variables, and turn them into secrets without just passing them in as an argument from the command line.

Am I missing something or is there just not a way to do this? I am a relatively new to dagger. But I can’t seem to find any examples of anybody doing this and I have tried a bunch of things that have been AI suggested as well to no avail.

magic spruce
chilly salmon
#

Oh perfect. Thanks! I’ve tried that out based on the documentation I found on the PR for that feature. I was able to get it working. It seems though that there are still a few GitHub issues open around this mechanism. Is there something that is being waited on for more formal documentation?
If it’s just a no one has done it yet I can try to grab a minute to write something up and send a PR.

magic spruce
magic spruce
#

Thank you for offering

chilly salmon