hashicorp / terraform-provider-google

Terraform Provider for Google Cloud Platform
https://registry.terraform.io/providers/hashicorp/google/latest/docs
Mozilla Public License 2.0
2.33k stars 1.73k forks source link

Provider issue authentication issue with googleapi #13512

Open rubansiva opened 1 year ago

rubansiva commented 1 year ago

Community Note

TF 0.13.7

Affected Resource(s)

GCP

Terraform Configuration Files

# Copy-paste your Terraform configurations here.
#
# For large Terraform configs, please use a service like Dropbox and share a link to the ZIP file.
# For security, you can also encrypt the files using our GPG public key:
#    https://www.hashicorp.com/security
#
# If reproducing the bug involves modifying the config file (e.g., apply a config,
# change a value, apply the config again, see the bug), then please include both:
# * the version of the config before the change, and
# * the version of the config after the change.

Debug Output

See attached screenshots pls

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform init
  2. terraform plan

Important Factoids

Have tried using google application default login as well service account key file but had same issue.

References

I'm having a weird issue with TF provider authentication on a local machine from a corporate machine. It seems to be having provider auth issues within the google provider as per screenshots but does seem to work on a similar build within another corporate machine.

From the TF debug logs, it seems to be trying to authenticate initially with ww.googleapis.com/auth/userinfo then fallback to openidconnect.com/auth which also seems to fail. Having tried authentication with CURL and seen it working, I assume this isn't some corporate proxy related issue.

image image

Any ideas?

ggtisc commented 8 months ago

Hi @rubansiva did you solve this issue? I see that it is an authentication fail, so what is the authentication method that you implemented? You can review the authentication guides on the next links: