terraformer icon indicating copy to clipboard operation
terraformer copied to clipboard

Cannot fetch token: 400 Bad Request with Google

Open tomascharad opened this issue 7 months ago • 2 comments

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/[email protected]/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

tomascharad avatar Jul 02 '24 22:07 tomascharad