# Using terraform to create auth0\_connection

**URL:** <https://community.auth0.com/t/using-terraform-to-create-auth0-connection/57538>\
**Category:** Get Help\
**Tags:** connections, auth0\
**Created:** [February 8, 2021, 8:44am UTC](https://community.auth0.com/t/using-terraform-to-create-auth0-connection/57538 "2021-02-08T08:44:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bill\_a](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bill_a/32/25962_2.png) [@bill\_a](https://community.auth0.com/u/bill_a)\
**Post date:** [February 8, 2021, 8:44am UTC](https://community.auth0.com/t/using-terraform-to-create-auth0-connection/57538/1 "2021-02-08T08:44:32Z")

</div>

i am actually working with terraform to create an `auth0_connection` from a gcp api credentials:

```auto
resource "auth0_connection" "my_connection" {
  name = "my_connection"
  strategy = "google-apps"
  is_domain_connection = false
   
  options {
    allowed_audiences = ["myDomain.com"]
    scopes = ["email", "profile"]
    api_enable_users = true
    
  }
}

```

But I get this error

400 Bad Request: undefined is not a valid google apps domain

I know that I have to add the domain but when I added to options it doesn’t work for me.

Should I add a config in auth0 account with default domain or I should add a config in gcp?

---

<div class="post-metadata">

**Author:** ![tmt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tmt/32/16540_2.png) [@tmt](https://community.auth0.com/u/tmt)\
**Post date:** [May 25, 2021, 5:52pm UTC](https://community.auth0.com/t/using-terraform-to-create-auth0-connection/57538/2 "2021-05-25T17:52:40Z")

</div>

I had the same problem.

I tried to deploy a passwordless login with Pulumi (which seems to use Terraform in the background) and in the end, I got a 400 error, because the passwordless part of the URL seems to be fixed.

I then activated the (passwordless) email connection manually and it now seems to be activated for all new applications I deploy. Which is currently fine for me. But, yeah, I had the impression connections would belong to one application and not the other way around.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [September 8, 2023, 7:22am UTC](https://community.auth0.com/t/using-terraform-to-create-auth0-connection/57538/3 "2023-09-08T07:22:53Z")

</div>

Hey there everyone! 👋🏼

I thought I’m gonna chime in with something that might be of your interest! We’re hosting an Ask Me Anything Session in our Forum regarding Auth0 Terraform Provider.

It’s gonna be on Thursday, September 28, 2023. Check out more info about it here!

> [@Auth0 Community Ask Me Anything with Auth0 Terraform Provider](https://community.auth0.com/t/ask-me-anything-with-auth0-terraform-provider/115670):
>
> Auth0 by Okta Community Ask Me Anything with Auth0 Terraform Provider The Auth0 Community is excited to invite you to our next interactive online Ask Me Anything (AMA) session on Thursday, September 28, 2023, featuring the Auth0 Terraform Provider Product Team. Did you know that the Auth0 Terraform Provider offers a streamlined way to manage Auth0 configurations using Infrastructure as code, allowing for easy version control, automation, and integration into existing DevOps pipelines? No matter…

---

<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 22, 2023, 7:23am UTC](https://community.auth0.com/t/using-terraform-to-create-auth0-connection/57538/4 "2023-09-22T07:23:08Z")

</div>

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