auth0 / auth0-deploy-cli

The Auth0 Deploy CLI is a tool that helps you manage your Auth0 tenant configuration. It integrates into your development workflows as a standalone CLI or as a node module.
MIT License
236 stars 147 forks source link

Merging AUTH0_KEYWORD_REPLACE_MAPPINGS from env and config file #896

Open mutefiRe opened 3 months ago

mutefiRe commented 3 months ago

Checklist

Describe the problem you'd like to have solved

Like recommended, we are using multiple config.json files, say one per environment and having a lot of variables in the AUTH0_KEYWORD_REPLACE_MAPPINGS which are not secret but should be version controlled. On the other hand we have multiple secrets (like aws, google) which need to be injected into the mapping as well, which are not version controlled and come from the CI.

So I'm not sure how to best still define the keyword replace mapping with all the hardcoded values per environment but still be able to inject secrets without doing some additional scripting around this.

Describe the ideal solution

One solution would be to merge the value coming from the ENV and from the config file and prioritize the ENV.

Alternatives and current workarounds

Replacement of ENV variables in the config.json from the environment.

Current workarounds:

Additional context

If this is already somehow possible without scripting it would be nice to see a guide in the docs.

Marchelune commented 3 months ago

Hi there! We are in a similar situation, it would be nice to have a workflow to manage secrets - such as email providers API key.

As @mutefiRe rightly highlights, it's possible with some custom scripting, but perhaps it could be integrated in the CLI, to reduce the tooling maintenance.