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

Support GOOGLE_BACKEND_CREDENTIALS env var #6

Open
Voziv opened this issue Aug 13, 2021 · 1 comment
Open

Support GOOGLE_BACKEND_CREDENTIALS env var #6

Voziv opened this issue Aug 13, 2021 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Voziv
Copy link

Voziv commented Aug 13, 2021

I may be mistaken, but it seems this plugin does not allow the usage of GOOGLE_CREDENTIALS / GOOGLE_BACKEND_CREDENTIALS which is very confusing when the gcs remote state supports loading the service account key from these env vars.

I ran into this issue when trying to migrate our terraform CI to use terraspace instead as we have both of the above env vars defined.

GOOGLE_BACKEND_CREDENTIALS should be used first as the bucket could be in a different project from the GCP resources being deployed.

I'm seeing this with terraspace version 0.6.13 & ruby 2.7.0

@tongueroo tongueroo added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 4, 2022
@Voziv
Copy link
Author

Voziv commented Jan 24, 2022

Looking a bit deeper I think my misunderstanding is that terraspace is using the google storage plugin for ruby which is different than the terraform gcs backend plugin.

The GCS plugin uses the environment variables as I've described. However the google storage plugin accepts it's own set of environment variables.

https://github.com/googleapis/google-cloud-ruby/blob/719c421b316cf9eb21df3b47abed73a6b0444c84/google-cloud-storage/AUTHENTICATION.md#environment-variables

We haven't used these to craft a solution yet. I will try to make sure we share whatever we do come up with.

If I had a vote though I'd say the best option for terraspace would be to have this align with terraforms GOOGLE_BACKEND_CREDENTIALS to keep things all in-line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants