TypeError when using keyword replacement with database enabled clients

I’m trying to implement keyword replacement to allow me to manage our development and production tenants. It’s working as expected, but I’m getting an error when I try to use it for the enabled_clients attribute on a username/password database connection. The goal is to enable it for some applications in development, but not in production.

If I enable debug output when running a0deploy export I see the following:

2024-07-19T16:10:14.369Z - debug: TypeError: (enabledClients || []).map is not a function or its return value is not iterable

My config looks like this:

  "AUTH0_KEYWORD_REPLACE_MAPPINGS": {
    "DATABASE_CONNECTIONS_USERNAME_PASSWORD_ENABLED_CLIENTS": [
      "AnApplication",
      "AnotherApplication"
    ],
  }

with a replacement like:

"enabled_clients": "@@DATABASE_CONNECTIONS_USERNAME_PASSWORD_ENABLED_CLIENTS@@"

Using the same technique for another attribute in the file (e.g. realms) works as expected.

Have I made some mistake in the syntax? Or is this a bug in the CLI?

Hi @joshua.arnott

Welcome to the Auth0 Community!

Can you open up an issue in the CLI reporitory → Issues · auth0/auth0-cli · GitHub and link the issue here?

I will ping the repo owners to check your issue.

Thanks
Dawid

Posted an issue at TypeError when using keyword replacement with database enabled clients · Issue #929 · auth0/auth0-deploy-cli · GitHub