# Terraform Disabling Social connections

**URL:** <https://community.auth0.com/t/terraform-disabling-social-connections/190655>\
**Category:** Get Help\
**Tags:** free-trial, connections\
**Created:** [August 15, 2025, 4:22pm UTC](https://community.auth0.com/t/terraform-disabling-social-connections/190655 "2025-08-15T16:22:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sandra/32/71203_2.png) [@sandra](https://community.auth0.com/u/sandra)\
**Post date:** [August 15, 2025, 4:22pm UTC](https://community.auth0.com/t/terraform-disabling-social-connections/190655/1 "2025-08-15T16:22:13Z")

</div>

When you use the Terraform auth0\_client resource to create a new Client, by default it enables the “Social (google-oauth2, github, etc.)” Connection.

With Terraform, how can I disable these Social connection?

I saw this in the doc

```resource
  connection_id = auth0_connection.my_conn.id
  enabled_clients = []
}

```

But I do not know which value to set for auth0\_connection.my\_conn.id

I tried this

```auto
data "auth0_connection" "github" {
  name = "github"
}

# deactivate github social login for all
resource "auth0_connection_clients" "github_link" {
  connection_id = data.auth0_connection.github.id
  enabled_clients = [
  ]
}

```

But terraform apply fails with message │ The connection already has enabled clients attached to it. Import the resource instead in order to proceed with the changes. Run: ‘terraform import auth0\_connection\_clients.  
│ con\_8w5ut6Yq3oTFAzfv’.

I did not manage to find the proper terraform command

Thanks for your help

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [August 15, 2025, 7:25pm UTC](https://community.auth0.com/t/terraform-disabling-social-connections/190655/3 "2025-08-15T19:25:48Z")

</div>

Hi @sandra,

Welcome to the Auth0 Community!

The reason you are encountering the error is precisely stated in the above mentioned error, so you’ll firstly need to import the resource in order to manage it.

# Example:

terraform import auth0\_connection\_clients.my\_conn\_clients\_assoc “con\_XXXXX”

The connection id can be easily be found in the **Auth0 Dashboard - Authentication - Social -** click on the specific **Connection -** and it’s listed near the **Identifier** field. It will always start with the `con_` prefix.

You can also take a closer look at the [auth0\_connection\_clients](https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/connection_clients#import) terraform examples.

However by following this pattern you’ll have to do this for all your connections. The reason why all social connections are automatically enabled when creating a new application is because of having the **Enable Application Connections** setting enabled. This can be disabled from the **Tenant Settings \> [Advanced](https://auth0.com/docs/get-started/tenant-settings#settings) \> Enable Application Connections**, or when creating a new tenant in terraform with a setting such as:

```auto
resource "auth0_tenant" "tenant" {
# Other settings not shown here for simplicity.
flags {
enable_client_connections = false
}
}

```

I hope this helps!  
Best regards,  
Remus

---

<div class="post-metadata">

**Author:** ![sandra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sandra/32/71203_2.png) [@sandra](https://community.auth0.com/u/sandra)\
**Post date:** [August 18, 2025, 12:07pm UTC](https://community.auth0.com/t/terraform-disabling-social-connections/190655/4 "2025-08-18T12:07:24Z")

</div>

It worked well, thank you!

---

<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:** [September 1, 2025, 12:08pm UTC](https://community.auth0.com/t/terraform-disabling-social-connections/190655/5 "2025-09-01T12:08:21Z")

</div>

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