-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
backend: Add service account impersonation to GCS Backend and update the docs #26700
Conversation
Codecov Report
|
@rileykarson @megan07 FYI This needs to merged to complete the service account impersonation work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @upodroid, thanks for your work on this, and for working through those GCS backend issues!
This PR seems to reintroduce module vendoring, which we removed in #26358. Can you please undo that change?
Until you're able to remove vendoring, it's difficult to review the PR, but from glancing at the go.mod
changes I'm not sure what has necessitated so many dependency upgrades. If would be helpful if you could list the go mod
commands you used to get here.
Thanks again!
Hi I'm bumping I pushed a commit without the vendor. |
|
I have a working go.mod that isn't breaking anything yet. |
Hey, can I get this reviewed? I would like to see this merged before 0.14 release and cherry picked to 0.13.X |
Hey @upodroid! Thanks for taking the time to submit this PR. I wanted to add that we, Terraform Core, aren't domain experts on the GCS backend and so we've invited some external expertise to help us complete the review. I should note that his will not be backported to Thanks for your contribution and your patience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* `access_token` - (Optional) A temporary [OAuth 2.0 access token] obtained | ||
from the Google Authorization server, i.e. the `Authorization: Bearer` token | ||
used to authenticate HTTP requests to GCP APIs. This is an alternative to | ||
`credentials`. If both are specified, `access_token` will be used over the | ||
`credentials` field. | ||
* `prefix` - (Optional) GCS prefix inside the bucket. Named states for | ||
workspaces are stored in an object called `<prefix>/<name>.tfstate`. | ||
* `path` - (Deprecated) GCS path to the state file of the default state. For |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecated values should probably still be documented until their removal, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was deprecated more than 3 years ago.
c00e929#diff-6665bbab4d1bce80874ff6467cd7bb85a08c9faaeaf8d2da121411b3a1ddbd55
My bad, the field is still lurking around in the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkolyvas Do you want me to target that field for removal in 0.15?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a commit adding that line back in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for all this work, @upodroid! 🎉
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. |
I recently implemented Service Account Impersonation in the Google Terraform Provider. This PR offers similar functionality in Terraform Core.
hashicorp/terraform-provider-google#7542
I reviewed all the issues labelled as backend/gcs and many of them can be closed.
Fixes: #24736 by clarifying User ADCs expire.
Fixes: #23034 by clarifying how to run terraform on Google Cloud. Most users forget to set the correct scopes on their service accounts.
Fixes: #24392 Access tokens are used to Impersonate Service Accounts. This feature removes that need.
Closes: #22038 Same as 24392
Closes: #21680 This already exists
Closes: #20785 This already exists
Closes: #18955 This already exists
Fixes: #17222 Docs were recently updated to clarify that a bucket needs to be created beforehand and my new changes about authentication. I also added a note about eventually consistency. IAM grants take a few minutes to take effect on GCS and it is the cause of some of the 403s in that issue.
Closes: #21562 I repro'd that issue and it has been fixed. Left a comment on it.
Closes: #18933 I repro'd that issue and it has been fixed. Left a comment on it.
Closes: #24716 I answered the issue the OP linked from the TPG repo.
Closes: #25040 I answered the issue.
Closes: #25050 This PR is not needed. Explained to OP how to use User ADCs.