# Auth0-deploy-cli latest version of action module

**URL:** <https://community.auth0.com/t/auth0-deploy-cli-latest-version-of-action-module/200557>\
**Category:** Get Help\
**Tags:** extensibility, actions-extensibility\
**Created:** [June 5, 2026, 3:00pm UTC](https://community.auth0.com/t/auth0-deploy-cli-latest-version-of-action-module/200557 "2026-06-05T15:00:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerardino.illescas](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gerardino.illescas/32/72254_2.png) [@gerardino.illescas](https://community.auth0.com/u/gerardino.illescas)\
**Post date:** [June 5, 2026, 3:00pm UTC](https://community.auth0.com/t/auth0-deploy-cli-latest-version-of-action-module/200557/1 "2026-06-05T15:00:55Z")

</div>

Hi! I’m using the [auth0-deploy-cli](https://auth0.com/docs/deploy-monitor/deploy-cli-tool) to orchestrate deployment of my tenant, including actions. Recently I got started using an action module to reuse some configuration and code. However, I have to specify a version for the module my action is using. In the yaml syntax it kind of looks like this:

```auto
modules:
  - module_name: logger
    module_version_number: 1

```

My issue is that on every deployment I also release a new version of the module. How can I tell the deploy cli that I want my action to use the latest module version instead of a specific version without having to [use the API](https://auth0.com/docs/api/management/v2/actions/patch-action) or the dashboard?

---

<div class="post-metadata">

**Author:** ![gerald.czifra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gerald.czifra/32/75301_2.png) [@gerald.czifra](https://community.auth0.com/u/gerald.czifra)\
**Post date:** [June 6, 2026, 12:08am UTC](https://community.auth0.com/t/auth0-deploy-cli-latest-version-of-action-module/200557/3 "2026-06-06T00:08:58Z")

</div>

Hi @gerardino.illescas

Welcome to the Auth0 Community!

I understand that you are looking for a version control option in the action module when using auth0-deploy-cli.

With the use of [AUTH0\_KEYWORD\_REPLACE\_MAPPINGS](https://auth0.com/docs/deploy-monitor/deploy-cli-tool/keyword-replacement) you are able to parameterize the module version number in your `tenant.yaml` and inject the actual latest version dynamically. The correct mappings have to be set in this configuration property, in the resource configuration files, from where keywords can be injected through one of two ways:

1. `@@EXAMPLE_KEY@@`: Using the `@` symbols causes the tool to perform a `JSON.stringify` on your value before replacing it. So if your value is a string, the tool will add quotes; if your value is an array or object, the tool will add braces.
2. `##EXAMPLE_KEY##`: Using the `#` symbol causes the tool to perform a literal replacement; it will not add quotes or braces.

As outlined in the linked documentation, your config.json file should look like so:

```auto
{
  "AUTH0_DOMAIN": "test-tenant.us.auth0.com",
  "AUTH0_CLIENT_ID": "FOO",
  "AUTH0_CLIENT_SECRET": "BAR",
  "AUTH0_KEYWORD_REPLACE_MAPPINGS": {
    "ENVIRONMENT": "dev",
    "ALLOWED_LOGOUT_URLS": ["https://dev-test-site.com/logout", "localhost:3000/logout"],
    "ALLOWED_ORIGINS": ["https://dev-test-site.com", "localhost:3000"]
  }
}

```

Allow me to share some additional resources which can be useful for solving the issue:

- [Auth0 CLI and action secrets](https://community.auth0.com/t/auth0-cli-and-action-secrets/88103);
- [How to specify latest version for dependency from auth0-deploy-cli](https://community.auth0.com/t/how-to-specify-latest-version-for-dependency-from-auth0-deploy-cli/99160).

Let us know if the provided information have helped you achieve dynamic version control.

Best regards,  
Gerald

---

<div class="post-metadata">

**Author:** ![gerardino.illescas](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gerardino.illescas/32/72254_2.png) [@gerardino.illescas](https://community.auth0.com/u/gerardino.illescas)\
**Post date:** [June 8, 2026, 3:41pm UTC](https://community.auth0.com/t/auth0-deploy-cli-latest-version-of-action-module/200557/4 "2026-06-08T15:41:39Z")

</div>

Hi @gerald.czifra and thanks for your answer!

> I understand that you are looking for a version control option in the action module when using auth0-deploy-cli.

Yes, if I could also put it in another way: I would like to automate the box that appears on [this screen](https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/customize/actions/modules/actions-modules-use-module.png) (from [this page](https://auth0.com/docs/customize/actions/modules/write-your-first-action-module)) that reads “Outdated modules were detected. Available updates: 1” and then a button that says “Update All”.

Now, regarding your proposal, I couldn’t get it to work because first the `AUTH0_KEYWORD_REPLACE_MAPPINGS` _ **does not support numbers** _ (there isn’t even a mention about numbers in the whole page, just strings, objects and arrays) and the yaml configuration for auth0-cli the attributes `latest_version_number` and `module_version_number` on the actionModules and actions respectively _ **only support numbers** _.

For example, when using the following:

```yaml
  module_version_number: '##MODULE_LOGGER_VERSION##'
  # or
  module_version_number: ##MODULE_LOGGER_VERSION## # (without quotes)
  # or 
  module_version_number: @@MODULE_LOGGER_VERSION@@ # using the @@

```

Then I get the following from the deploy-cli:

```bash
error: Schema validation failed loading [
    {
        "keyword": "type",
        "dataPath": ".actions[8].modules[0].module_version_number",
        "schemaPath": "#/properties/actions/items/properties/modules/items/properties/module_version_number/type",
        "params": {
            "type": "number"
        },
        "message": "should be number"
    }
]

```

Second: the deploy-cli apparently _first_ deploys actions and _second_ modules. Even if I do the following:

```yaml
actionModules:
  - name: logger
    all_changes_published: true
    code: ./logger/index.js
    latest_version_number: 12 # NOTE THE VERSION IS THE SAME AS THE ACTION BELOW
actions:
  - name: LoginCustomTokens
    code: ./actions/LoginCustomTokens/index.js
    deployed: true
    runtime: node22
    status: built
    supported_triggers:
      - id: post-login
        version: v3
    modules:
      - module_name: logger
        module_version_number: 12 # NOTE THIS IS THE SAME VERSION AS THE MODULE ABOVE

```

I will get from auth0-cli:

```bash
2026-06-08T14:35:44.245Z - error: Could not find action module version id for module 'logger' version '12'

```

If I could have it my way, I would love that the auth0-deploy-cli would have the option for the action to specify just “latest” version of module. It would look like:

```yaml
actions:
  - name: LoginCustomTokens
    code: ./actions/LoginCustomTokens/index.js
    deployed: true
    runtime: node22
    status: built
    supported_triggers:
      - id: post-login
        version: v3
    modules:
      - module_name: logger
        module_version_number: latest

```

And this way I know that if I deploy a new module version, it will automatically update the dependencies using it to that new version. Or at the very least have the second problem I mentioned fixed so that I can synchronize the versions together.
