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

export removes environment variable secrets placeholder values #902

Open ilovett opened 2 months ago

ilovett commented 2 months ago

Checklist

Description

If we have a tenant.yaml which contains:

actions:
    secrets:
      - name: API_URL
        value: @@API_URL@@

Importing or pushing this will work, using dotenv or environment variable, these values will be pushed to the action secret and value set correctly.

However, when exporting or pulling, the value: @@API_URL@@ line will be completely erased from tenant.yaml.

So every time we pull, we need to manually re-add this back. This can be tedious depending on the number of secrets and actions we have.

I've tried using AUTH0_KEYWORD_REPLACE_MAPPINGS to get around it, but cannot get this value: @@API_URL@@ line to stay in my tenant.yaml when exporting.

For example

  "AUTH0_KEYWORD_REPLACE_MAPPINGS": {
    "API_URL_SECRET_VALUE": "@@API_URL@@"
  },

I've also tried different combinations of "##API_URL##"

However, exporting or pulling always removes it, and we must manually re-add it back.

Did I miss something in the documentation?

Expectation

I would expect to have some way of keeping the instructions to use an environment variable not to be removed from the yaml.

Reproduction

See description

Deploy CLI version

7.21.0

Node version

20.11.1