Using terraform to create auth0_connection

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

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?

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.

1 Like

Hey there everyone! :wave:t3:

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!

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