#Is there a way to set up defaults for secrets?

1 messages · Page 1 of 1 (latest)

polar imp
#

I've set up the secrets as global in my module's constructor, like:

  constructor(
    @argument({ required: true })
    obanKeyFingerprint: Secret,

    @argument({ required: true })
    obanLicenseKey: Secret,
  ) {
    this.obanKeyFingerprint = obanKeyFingerprint;
    this.obanLicenseKey = obanLicenseKey;
  }

And I'm calling functions like:

dagger call --obanKeyFingerprint=env://OBAN_KEY_FINGERPRINT --obanLicenseKey=env://OBAN_LICENSE_KEY docs-build

I also have a lot of directories set up in the constructor, using defaultPath so I don't need to specify them in calls.
Is there a way to do similar with secrets? It'll always be those environment variables, used to auth to a private registry for one of our dependencies.

stiff sable
# polar imp I've set up the secrets as global in my module's constructor, like: ```typescrip...

not yet! But we really want to add it. Looking for a design that balances convenience and safety.

https://github.com/dagger/dagger/issues/9584

GitHub

Overview Dagger should natively support .env files. It's a de facto standard for managing environment-specific configuration in a lightweight, portable way. It is widely supported, included by ...

#

actually that issue is more tied to .env than it should