After logging in, I tried to run Terraform in GCP and received this error:

<pre lang="bash">
oauth2: cannot fetch token: 400 Bad Request

Here’s the fix. Login using application-default.

<pre lang="bash">
gcloud auth application-default login

You can then Terraform.

<pre lang="bash">
terraform apply