feat: add additional bucket policy#8194
Conversation
|
Merging this PR will trigger the following deployment actions. Support deploymentsNo support upgrades will be triggered Staging deployments
Production deployments
|
|
I didn't notice a place to add additional bucket policies like hub_cloud_permissions.extra_iam_policy does for the hub, and the existing bucket policy seemed to only be generated through the current "bucket_access" for_each. Maybe I just missed the configuration somewhere? |
| "s3:GetBucketLocation" | ||
| ], | ||
| "Resource": [ | ||
| "__BUCKET_ARN__", |
There was a problem hiding this comment.
This needs the actual ARN right?
There was a problem hiding this comment.
it should, yeah. I try to do this with a replace using the value from below
aws_s3_bucket.user_buckets[each.value.bucket_name].arn
There was a problem hiding this comment.
Ah! Can we just hardcode it instead? This terraform is used for a lot of hubs (outside of the veda related projects too https://github.com/2i2c-org/infrastructure/tree/main/terraform/aws/projects), and I want to keep changes minimal if we can. (sorry, forgot to post this earlier)
There was a problem hiding this comment.
Hardcode the ARN? Yeah, I can make that change, it would just be removing the try/replace. It would still modify the "user_buckets" object in variables.tf which is probably why it's showing so many changes?
There was a problem hiding this comment.
Ah, I had misread where this was being applied. I think this is fine. I just documented BUCKET_ARN here.
Thanks for the PR, and sorry about the delay!
|
Were there other comments about this? Not sure about the urgency of it, just wanted to make sure we got this back into code |
|
@jjfrench trying to apply this (after rebasing on main) gives me a much larger diff than I expect: Any idea what's going on? |
|
My terraform knowledge isn't the greatest 😅 but it looks like it's picking up a different var file? I didn't touch the for_each so it should still be using the user_buckets struct I thought it might be another project's but I couldn't find any structs like also expected some change to scratch-staging somewhere given the changes to the bucket definition but maybe it's compiling the same even after the change since it doesn't change what's deployed |
6498e7e to
41988cb
Compare
525365c to
ab6687e
Compare
Description