google-github-actions / auth

A GitHub Action for authenticating to Google Cloud.
https://cloud.google.com/iam
Apache License 2.0
968 stars 207 forks source link

Export GOOGLE_CREDENTIALS for Terraform #364

Closed davidcavazos closed 11 months ago

davidcavazos commented 11 months ago

TL;DR

Terraform expects an environment variable called GOOGLE_CREDENTIALS for authentication. It would be nice that the extension provided them.

Detailed design

From the docs:

... You can alternatively use the GOOGLE_CREDENTIALS environment variable, or any of the following ordered by precedence.

GOOGLE_CREDENTIALS GOOGLE_CLOUD_KEYFILE_JSON GCLOUD_KEYFILE_JSON

https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#authentication-configuration

Additional information

No response

github-actions[bot] commented 11 months ago

Hi there @davidcavazos :wave:!

Thank you for opening an issue. Our team will triage this as soon as we can. Please take a moment to review the troubleshooting steps which lists common error messages and their resolution steps.

sethvargo commented 11 months ago

That's not the only envvar Terraform supports - it also supports GOOGLE_APPLICATION_CREDENTIALS, which this action outputs.

If the authentication is not working for you, please open an issue as a "bug" and complete the issue form, including your action.yml and the debug logs.