auth0/auth0-deploy-cli

export removes environment variable secrets placeholder values

ilovett opened this issue · 0 comments

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this tool and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

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