-
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
Terraform plan after apply has additional ACL changes required and never resolves. #892
Comments
Hi @srunix88, The behavior is definitely wrong and has to be fixed. The original author of this resource even left a comment in the code about it: // The API offers no way to retrieve predefined ACLs,
// and we can't tell which access controls were created
// by the predefined roles, so...
//
// This is, needless to say, a bad state of affairs and
// should be fixed. Have you considered using IAM permission on the bucket instead of ACL? Thank you |
Hi @rosbo
Just to add my 2c - I also came across this problem recently while trying to set permissions on a bucket for stackdriver logging export/sink. I thought I'd be able to use IAM permissions instead of the legacy ACL's but the log export refused to work unless I added the logging service account to the ACL. |
I left the comment being referenced there, but I believe it's for a different scenario. That comment specifically refers to the case where a predefined ACL is used (e.g., We had a solution for this at one point.... I think #358 was the solution. It looks like what's happening is that GCS creates certain ACLs automatically for buckets, granting permissions to project owners and editors and viewers. #358 was to overwrite those permissions, I believe. It looks like somehow that has come undone. |
Ah, 7211463#diff-3fea3b74d283e6b124ef3009fc921ec3 has more information, too. I believe a possible workaround would be to add |
I believe #1692 resolved this. If anyone is still experiencing it, please feel free to reply, and we can reopen this. |
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 👉 [email protected]. Thanks! |
Summary:
After running terraform apply, a subsequent terraform plan indicates it needs to perform additional changes for ACLs even though the plan indicated it completed. (see output samples below).
If you run apply multiple times afterward, it will appear to perform a change, but plan will still show a change is required.
Terraform Version
Terraform v0.11.1
Affected Resource(s)
~ google_storage_bucket_acl
Terraform Configuration Files
Expected Behavior
It should not think it needs to make additional changes after an apply is run.
Actual Behavior
After configuring the ACLs, which work, it thinks it needs to update the ACLs again.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform init -from-module=$GCP_DIR/storage-bucket
terraform plan $VARS
terraform apply --auto-approve $VARS
terraform plan $VARS
Important Factoids
We are using modules and testing by passing values on the command line.
References
none
The text was updated successfully, but these errors were encountered: