# How to disable a database login/password on Terraform?

**URL:** <https://community.auth0.com/t/how-to-disable-a-database-login-password-on-terraform/129539>\
**Category:** Get Help\
**Tags:** custom-database-connections, connections\
**Created:** [March 12, 2024, 5:36pm UTC](https://community.auth0.com/t/how-to-disable-a-database-login-password-on-terraform/129539 "2024-03-12T17:36:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deborah](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/deborah/32/55570_2.png) [@deborah](https://community.auth0.com/u/deborah)\
**Post date:** [March 12, 2024, 5:36pm UTC](https://community.auth0.com/t/how-to-disable-a-database-login-password-on-terraform/129539/1 "2024-03-12T17:36:48Z")

</div>

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

 ![Screenshot 2024-03-12 at 18.30.40](https://global.discourse-cdn.com/auth0/original/3X/5/5/551f027857eff44ea65aa790ccc8da644136a599.png)

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](https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/connection) 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!

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [March 14, 2024, 9:35am UTC](https://community.auth0.com/t/how-to-disable-a-database-login-password-on-terraform/129539/2 "2024-03-14T09:35:41Z")

</div>

Thank you for posting @deborah !

> [@deborah](#):
>
> 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?

Could you maybe try this from the [auth0-connection-clients](https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/connection_clients#example-usage) resource perspective?

```auto

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 28, 2024, 9:36am UTC](https://community.auth0.com/t/how-to-disable-a-database-login-password-on-terraform/129539/3 "2024-03-28T09:36:29Z")

</div>

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