I am using latest auth0 terraform to configure our application domain. our usecase to create custom database and associate that database to a Web application.
I could achieve this using “auth0-client”, “auth0-connections” , “auth0-connection-client” .
however i could not disable default “Username-Password-Authentication” database asscoiated to that Webapp. any idea how to disable that using Terraform. Please help.
To be able to toggle off the pre-generated (and default) Username-Password-Authentication connection you will need to import the resource into Terraform as described in the following link.
Thanks. i tried importing. i am not sure how i can disconnect the “Username-Password-Authentication” database that is automatically tied to the terraform created new apps.
Steps.i followed
Get the Tenant ClientID , ClientSecret. Domain
Creater Terraform managed machine to machine app
Use terraform to create an App (singlePage)
Create Custom database
Use Grants to enable custom database to new App
Expected out:
New App connected with one custom user Database
What happened
I see two databases connected to the app.
Custom user database created via terraform
Successfully gave grants to newly created custom database from the App.
Default Username-Password-Authetnication database created
I am not sure how to de-activate the connection between app & default DB via terraform. Importing the resource to terraform don’t have any flag to disable or something.
It sounds like the Tenant flag enable_client_connections is enabled, which will result in all current connections being enabled on newly created Applications by default. There are two different ways you can toggle this off.
Through your Terraform configuration via the auth0_tenant resource. E.g.
Through your Auth0 Tenant Dashboard: Navigate Settings -> Advanced and then scroll down until you see Enable Application Connections and toggle the button off.
After disabling this setting, your newly created Applications will no longer have all the connections enabled by default, and instead you will be able to assign the connections in Terraform through the auth0_connection_client resource.