Import/Export rules settings with auth0-deploy-cli

Hi,

I’ve seen here that one can set hooks secrets in the config used by auth0-deploy-cli to deploy them on other tenants.

But can the same be done with rules settings? I have a bunch of secrets variables used in Rules and I’d like to avoid having to set them manually in every environment tenant I’m using.

In the Deploy CLI Tool documentation, it’s said that:

The Deploy CLI tool [imports] the following Auth0 tenant configuration objects:

  • Rules (including secrets/settings)

But even on the latest version of both the Extension (2.3) and the npm package (5.1), I can’t find my rules secrets/settings anywhere in the resulting config after making an export of my tenant config.

Am I missing a setting somewhere or is this not possible?

Thanks in advance :+1:

Hi @mob,

You can add ‘secrets’ by creating a rule-config folder and adding them there. check out this part of the documentation.

After you’ve created the file with the secret, you can access it from the rule by calling configuration.THE_KEY_OF_THE_SECRET; from within the rule.

Hope it helps :v:

1 Like

Thanks a lot for sharing it with the rest of community @Jelle!

Awesome, that’s exactly what I was looking for.

Although why this bit of information is in the GitHub Deployment section and not in the Deploy CLI Tool section (or even the documentation of auth0-deploy-cli) is beyond me… :thinking:

It might be a good idea to add it where it’s relevant :slightly_smiling_face:

Thanks @Jelle!

1 Like

Teamwork makes the dreamwork!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.