Enable Email/Password Identity Provider on GCP via Terraform

Viewed 238

I'm using the identity_platform_oauth_idp_config teraform resource to configure some OIDC providers on the Google Identity Platform, which is working as expected.

The Identity Platform also supports Email/Password and Phone as configurable providers, but I'm not able to find the respective terraform resources nor any documentation regarding these features.

Is it possible to enable the Email/Password provider via Terraform?

This would be how to enable it manually, but this is of course not an option.

Edit: I've created a ticket on the terraform-provider-google issue tracker

1 Answers

It is possible using Rest Api.

curl -X PATCH -H "Authorization: Bearer "$ACCESS_TOKEN
https://identitytoolkit.googleapis.com/v2/projects/$PROJECT/config
--header 'Accept: application/json'
--header 'Content-Type: application/json'
--data '{"signIn":{"email":{"enabled":true,"passwordRequired":true},"allowDuplicateEmails":false}}'
--compressed

Related