feat(storage): support bucket ip filter#34612
Conversation
|
Here is the summary of changes. You are about to add 6 region tags.
This comment is generated by snippet-bot.
|
Removed redundant explanation about uniform bucket-level access.
Removed unnecessary line break before accessing the IP filter.
There was a problem hiding this comment.
We cannot access the bucket after IP filter is enabled, right? So, we can still test enabling part.
There was a problem hiding this comment.
in tests we are testing for disabled only, in samples user can change it according to there requirement
added this particular test as it was requested
There was a problem hiding this comment.
Does ip_filter= support nil input?
There was a problem hiding this comment.
Yes, it does. If we set ip_filter to nil, it doesn't throw an error, and the existing ip_filter data simply remains unchanged. I've verified this behavior by testing it directly via an API call.
This pull request introduces the capability to configure IP filters for Google Cloud Storage buckets directly through the Ruby client library. It extends existing bucket management functionalities to allow specifying IP filter settings during bucket creation and provides methods to update these settings on existing buckets. The changes also include new sample code to demonstrate the usage of this feature, although some debugging code is still present, suggesting it is a work-in-progress.
Highlights
ip_filtergetter and setter methods to theGoogle::Cloud::Storage::Bucketclass, enabling programmatic access and modification of IP filter settings.create_bucketmethod inGoogle::Cloud::Storage::Projectto accept anip_filterparameter, allowing IP filter configuration during bucket creation.