Import/Export Tenant Configuration to YAML File
auth0-deploy-cli tool's YAML option supports the exporting to and importing of an Auth0 tenant configuration using a YAML file.
What can I use Rules for?
Import tenant configuration
To import an Auth0 tenant configuration:
config.json.example, making sure to replace the placeholder values with the values specific to your configuration.
client IDand secret from your newly-created client (the client is named
auth0-deploy-cli-extensionif you used the extension).
By default, the tool merges with your current environment variables and overrides the
config.jsonfile (which has the same top key). You can use the
--no-envoption to disable the override via the command line.
You can either set the environment variables, or you can place the values in a configuration file anywhere on the file system that is accessible by the CLI tool.
Deploy using the following command:
Example: configuration file
Here is the example of a
Import configuration example
The following is an example of an import config file called
tenant.yaml (for full details on everything that can be included, please refer to the extension's repository:
Export tenant configuration
To export your current tenant configuration, run a command that's similar to:
a0deploy export -c config.json -f yaml -o path/to/export
When importing objects into Auth0 tenants, Auth0 generates new IDs. To avoid import failure, identifier fields are stripped from the Auth0 objects on export by default. To override this behavior, use:
--export_ids or AUTH0_EXPORT_IDENTIFIERS: true
Some of the settings cannot be exported, such as
rulesConfigs values. After exporting, you may need to update the values in
tenant.yaml if you see schema-related errors during the import process.
For more information, see Environment Variables and Keyword Mappings.