How to disable a database login/password on Terraform?

On my application connections, I have a database connection that I would like to disable through Terraform.

I know I can just toggle the option on and off through the admin console but this really needs to be done through Terraform to keep a record of our changes.

How can I do that? There is nothing on the docs and I have tried a bunch of things already with no success. Note that I do not want to disable the sign up only - I want to disable the entire database connection, it shouldn’t even appear as an option on my app.

Also, please that I have created these connections on the admin console originally, so there’s no trace of them on my Terraform files.

Thank you!

Thank you for posting @deborah !

Could you maybe try this from the auth0-connection-clients resource perspective?


resource "auth0_connection_clients" "my_conn_clients_assoc" {
  connection_id = auth0_connection.my_conn.id
  enabled_clients = [
    auth0_client.my_first_client.id,
    auth0_client.my_second_client.id
  ]
}

As a connection_id you would use the database connection identifier currently enabled for your app, and for enabled_clients array you would use only the relevant client_ids excluding your app id.

2 Likes

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