-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Only check if versioning is enabled on GCS bucket when skip_bucket_versioning is false #1610
Merged
robmorgan
merged 1 commit into
gruntwork-io:master
from
davidalger:gate-versioning-check
Apr 16, 2021
Merged
Only check if versioning is enabled on GCS bucket when skip_bucket_versioning is false #1610
robmorgan
merged 1 commit into
gruntwork-io:master
from
davidalger:gate-versioning-check
Apr 16, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rsioning is false
@robmorgan Could you share your thoughts on this? |
@brikis98 sure, happy to look into this tomorrow! |
robmorgan
reviewed
Apr 16, 2021
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.
LGTM
robmorgan
approved these changes
Apr 16, 2021
Thank you guys! |
This was referenced Aug 5, 2021
This was referenced Aug 5, 2021
This was referenced Aug 5, 2021
This was referenced Aug 5, 2021
This was referenced Aug 5, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Have a use-case where I am running everything in CI pipelines executed on a GKE cluster which is using workload identity to ascribe the runners a service account which has access to state files and the ability to impersonate service accounts required to plan and apply each of the modules in a given pipeline.
The main service account on the runner has
roles/storage.objectAdmin
on the GCS bucket where state is located. This has been working very will when Terraform is used directly, but failing when attempting to introduce Terragrunt to these pipelines with the following error message:Granting
roles/storage.admin
on the bucket isn't really an option, and I'd rather not create a custom role simply to allow the versioning check (which is what triggers the error) to pass. In our case, buckets are created by Terraform with versioning enabled and this is no need to have Terragrunt verifying it's enabled on every run.What I'm proposing here, since the check is indeed valuable, is to simply skip the check when
skip_bucket_versioning
istrue
allowing Terragrunt to operate with nothing more than is required for Terraform itself to operate. If a different option for the behavior would be preferred, lmk and I can update the PR.When compiled with the changes in this PR, the following configuration resolves the permissions by avoiding the need for
storage.buckets.get
as the versioning check is no longer performed: