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 = [""]
    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.