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

Correctly Mirror Terraform GCP Auth #907

Merged
merged 3 commits into from
Oct 18, 2019
Merged

Conversation

robmorgan
Copy link
Member

This PR adds support for correctly mirroring the Terraform GCP authentication behavior by supporting the GOOGLE_CREDENTIALS environment variable. Users can either pass in the contents or path to a credentials file.

@robmorgan robmorgan marked this pull request as ready for review October 11, 2019 17:39
Copy link
Contributor

@yorinasub17 yorinasub17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like build is still failing. Unsure if it is because of the environment variable collision, as I didn't have time to dig in.

defaultCreds := os.Getenv("GCLOUD_SERVICE_KEY")
defer os.Setenv("GCLOUD_SERVICE_KEY", defaultCreds)
os.Unsetenv("GCLOUD_SERVICE_KEY")
os.Setenv("GOOGLE_CREDENTIALS", defaultCreds)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to disable t.Parallel for this test to avoid colliding with other tests that might expect these env vars.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea.

@robmorgan
Copy link
Member Author

@yorinasub17 looks like the build passes now, should I merge? https://circleci.com/gh/gruntwork-io/terragrunt/3237

Copy link
Contributor

@yorinasub17 yorinasub17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go for it!

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

Successfully merging this pull request may close these issues.

None yet

2 participants