Problem statement
We use auth0-deploy-cli version 7.15.2 and export in the Directory format with AUTH0_ALLOW_DELETE enabled to initialize a new Auth0 tenant with our configuration. We use AUTH0_ALLOW_DELETE because we want to ensure all default configuration is removed.
After running a deployment we see that the ‘Default App’ application and ‘google-oauth2’ connection are removed, but the default ‘Username-Password-Authentication’ database connection is retained. We do not have a ‘Username-Password-Authentication’ database connection in our deployed configuration, and the persisting of this connection is not mentioned in the auth0-deploy-cli log output.
Why is the default ‘Username-Password-Authentication’ database connection not removed when running with AUTH0_ALLOW_DELETE set to true?
Cause
- When exporting the tenant configuration and assets in directory format, database connections will be saved into a folder called ‘database-connections’. The import is not deleting the Username-Password-Authentication database connection because the folder was deleted completely, rather than leaving the folder and just deleting the contents.
Solution
You will need to include the Username-Password-Authentication
database connection folder that was deleted back to your directory of folders. In the future, please make sure to delete the contents inside the folder only and not the folder itself.