Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot fetch token: 400 Bad Request with Google #1894

Open
tomascharad opened this issue Jul 2, 2024 · 2 comments
Open

Cannot fetch token: 400 Bad Request with Google #1894

tomascharad opened this issue Jul 2, 2024 · 2 comments

Comments

@tomascharad
Copy link

tomascharad commented Jul 2, 2024

Hi!

First, thank you very much for this tool, I'm very excited about starting using it.
I'm trying to use the tool, but I cannot pass the following authentication error.
I've tried with different versions of the Google provider, but i'm still facing the same issue.
Many thanks!

Terraform: v1.9.0
Terraformer: v0.8.24
Terraform provider google: v5.36.0

tomascharad@Tomass-MacBook-Pro-2 xxx-infrastructure % terraformer plan google --projects=gke-poc-421401
2024/07/02 18:28:40 google importing project gke-poc-421401 region global
2024/07/02 18:28:40 Get "https://compute.googleapis.com/compute/v1/projects/gke-poc-421401/regions/global?alt=json&prettyPrint=false": oauth2: cannot fetch token: 400 Bad Request
Response: {
  "error": "invalid_grant",
  "error_description": "Bad Request"
}
2024-07-02T18:28:41.572-0400 [ERROR] plugin.terraform-provider-google_v5.36.0_x5: Response contains error diagnostic: diagnostic_attribute="" tf_req_id=594438f0-352b-1abc-87be-5a39e2dac807 @caller=github.com/hashicorp/terraform-plugin-go@v0.22.1/tfprotov5/internal/diag/diagnostics.go:58 @module=sdk.proto tf_proto_version=5.4 tf_provider_addr=registry.terraform.io/hashicorp/google tf_rpc=Configure
  diagnostic_detail=
  | An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider developer:
  | 
  | Received null value, however the target type cannot handle null values. Use the corresponding `types` package type, a pointer type or a custom type that handles null values.
  | 
  | Path: 
  | Target Type: fwmodels.ProviderModel
  | Suggested `types` Type: basetypes.ObjectValue
  | Suggested Pointer Type: *fwmodels.ProviderModel
   diagnostic_severity=ERROR diagnostic_summary="Value Conversion Error" timestamp=2024-07-02T18:28:41.572-0400
2024/07/02 18:28:41 Saving planfile to generated/google/gke-poc-421401/terraformer/global/plan.json
@feriva22
Copy link

feriva22 commented Jul 5, 2024

same issue here

@feriva22
Copy link

feriva22 commented Jul 5, 2024

If you have issue with Bad Request, you need set service account in your machine, at least Viewer Permissions , but after setup the service account still error with message "Value Conversion Error"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants