I have read through the guide for multiple environements but I am still unclear on how things should work. From that page, it says that the management API can be used automate the migration of settings from one environment to another. This seems reasonable, but if I look at the management API docs, I don’t see anything that really helps with this. Certainly, I could use the API to script out rules, clients, etc. but it seems like that is something that should be handled for me. If it’s not, that’s fine, but I just feel like I am missing something.
The other thing that keeps bugging me on this is that it looks like we need to have 3 subscriptions to have 3 environments (dev/test/prod). While dev/test would always be at the lowest cost level so the extra cost isn’t really a big deal, it feels weird to have to pay 3 bills to get a basic setup that allows for configuration/code promotion in a reasonable manner. Again, I feel like I must be missing something because I shouldn’t have to configure and pay for 3 things to really only support one production site.
There are a couple of tools you can use to deploy your configuration in multiple environments.
The first one is auth0-dump-config, this is node module will allow you to fetch different elements on your configuration and store them in local files. Please be aware that the module is very rough and there certain components that are not exported (resource servers, pages) and also you will need to clear some of the information that can’t be updated in the objects.
With the resulting files you can use one of the deployment extensions to automate the deployment from your code repo or you can use auth0-deploy-cli to deploy from the command line. The Auth0 Deploy CLI has some additional capabilities that will let you specify the configuration for different environments when needed so that would probably be the best option
I don’t think the accepted solution answers the entire question. What about having to pay for 3 subscriptions to support three environments (e.g. dev/test/prod)?