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

GCS remote state #6814

Closed
wants to merge 2 commits into from
Closed

Conversation

sl1pm4t
Copy link
Contributor

@sl1pm4t sl1pm4t commented May 21, 2016

This is PR #3719 rebased on top of master (0.7 code).
CC @stack72

@stack72
Copy link
Contributor

stack72 commented May 21, 2016

YAY! <3 thanks!

@jen20
Copy link
Contributor

jen20 commented May 23, 2016

Hi @sl1pm4t! I've just been testing this, but it appears it does't respect the environment variables for the location of credentials. Normally in Terraform we use a combination of GOOGLE_REGION, GOOGLE_PROJECT and GOOGLE_CREDENTIALS, but we are not honouring these in this case. I think we do need to account for the fact that the GCP account may be different from one under management, so consequently we should make explicitly passed -backend-var type parameters override the environment variables. Does this seem reasonable? Thanks for all your work so far, and sorry this has taken so long to get to!

@sl1pm4t
Copy link
Contributor Author

sl1pm4t commented May 23, 2016

Hi @jen20 - yep more than reasonable. I'll take another pass.

Matt Morrison added 2 commits May 25, 2016 10:07
Remove redundant of GOOGLE_PROJECT env var.
@sl1pm4t sl1pm4t force-pushed the gcs-remote-state-rebase2 branch from 58044fc to 38b98f2 Compare May 25, 2016 00:25
@sl1pm4t
Copy link
Contributor Author

sl1pm4t commented May 25, 2016

@jen20 I added support for the GOOGLE_CREDENTIALS env var.

@jen20
Copy link
Contributor

jen20 commented May 31, 2016

Thanks @sl1pm4t! I'll give this another shot now

@jen20
Copy link
Contributor

jen20 commented May 31, 2016

=== RUN   TestGCSClient_impl
--- PASS: TestGCSClient_impl (0.00s)
=== RUN   TestGCSClient
2016/05/31 13:41:26 [INFO] Requesting Google token...
2016/05/31 13:41:26 [INFO]   -- Email: travis-acctests@hashicorp-terraform-testing.iam.gserviceaccount.com
2016/05/31 13:41:26 [INFO]   -- Scopes: [https://www.googleapis.com/auth/devstorage.full_control]
2016/05/31 13:41:26 [INFO]   -- Private Key Length: 1704
2016/05/31 13:41:26 [INFO] Instantiating Google Storage Client...
Created bucket terraform-remote-gcs-test-574ddad6 at location https://www.googleapis.com/storage/v1/b/terraform-remote-gcs-test-574ddad6

2016/05/31 13:41:29 [INFO] Writing terraform-remote-gcs-test-574ddad6/testState
2016/05/31 13:41:29 [INFO] Writing terraform-remote-gcs-test-574ddad6/testState
2016/05/31 13:41:30 [INFO] Reading terraform-remote-gcs-test-574ddad6/testState
2016/05/31 13:41:30 [INFO] Downloaded 393 bytes
2016/05/31 13:41:30 [INFO] Deleting terraform-remote-gcs-test-574ddad6/testState
2016/05/31 13:41:30 [INFO] Reading terraform-remote-gcs-test-574ddad6/testState
2016/05/31 13:41:30 [INFO] terraform-remote-gcs-test-574ddad6/testState not found
--- PASS: TestGCSClient (5.95s)

I've rebased this and will merge locally. Thanks @sl1pm4t!

@sl1pm4t
Copy link
Contributor Author

sl1pm4t commented May 31, 2016

No problem. Thanks @jen20

@jen20
Copy link
Contributor

jen20 commented May 31, 2016

Merged as 48e85d6 - thanks @sl1pm4t!

@jen20 jen20 closed this May 31, 2016
@ghost
Copy link

ghost commented Apr 25, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants