-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
google_storage_bucket_iam* does not allow project per the docs #7170
google_storage_bucket_iam* does not allow project per the docs #7170
Comments
@GavBurke can you post the debug log? |
Simple repro with debug log attached for a terraform plan:
|
Thanks @ct-dh , sorry I completely forgot to come back to this @edwardmedia Just for info though, a colleague of mine suggested removing the project and let Google figure out itself which project the bucket is in, and to my surprise that just worked! The original issue, however, is still prevalent in that the documentation says you can specify project in the bucket_iam resources but that doesn’t work |
@GavBurke by removing https://www.terraform.io/docs/providers/google/guides/provider_reference.html#project-1 |
@edwardmedia you seem to have misunderstood the issue. The provider docs state that you can supply the
Excerpt from the docs page at https://www.terraform.io/docs/providers/google/r/storage_bucket_iam.html:
|
I'm also facing this issue in |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
This resource assigns a policy on a bucket which is global unique and which is already specified its relation to a project. It does not make sense to take a |
b/169953815 |
FWIW, I still see the project in the documentation. I get @edwardmedia's point about not requiring it because bucket name is unique, but please do remove it from the docs. It's confusing. I see that https://github.com/GoogleCloudPlatform/magic-modules/pull/4899 is still open and that should fix it. |
we just had a case where we moved a bucket to a new project and the initial plan did not trigger any IAM recreation as terraform does not know about the underlying relationship. for terraform the bucket name stays the same so no changes were planned. i assume there is a trigger missing if the underlying project of a bucket actually changes? we will work around this with explicit dependencies now in a module... |
I see that GoogleCloudPlatform/magic-modules#4662 and GoogleCloudPlatform/magic-modules#4899 were both attempts at fixing this, but they do not entirely work and have been stalled for quite a while. There is agreement that the @mariux I think explicit dependencies are what you want to use in your case, but to clarify, that would be for the |
b/251565688 |
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. |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v0.12.23
Affected Resource(s)
Terraform Configuration Files
Debug Output
Error: Unsupported argument
on permissions.tf line 2, in resource "google_storage_bucket_iam_member" "hidden_name_of_iam":
2: project = "my_changed_project"
An argument named "project" is not expected here.
Expected Behavior
IAM policy is applied to the named bucket in the named project
Actual Behavior
The terraform plan errors not expecting project
Steps to Reproduce
terraform plan
The text was updated successfully, but these errors were encountered: