Skip to content

buckets: enable Object Lock file lock when creating buckets #127

Description

@goanpeca

Summary

Expose the SDK's fileLockEnabled create-bucket option so workflows can create Object Lock-capable buckets.

Why

B2 Object Lock must be enabled when a bucket is created; it cannot be enabled later on a normal bucket. The action has retention verbs and issues for default retention, but without fileLockEnabled during bucket creation, infrastructure workflows cannot bootstrap compliant buckets end to end.

SDK support (already available)

  • B2Client.createBucket({ fileLockEnabled })
  • CreateBucketRequest.fileLockEnabled
  • BucketInfo.fileLockConfiguration

Proposed surface

Extend the future create-bucket action from #100 with:

  • file-lock-enabled (true / false, default false)

The output/summary should include the returned fileLockConfiguration so users can verify the bucket was created with Object Lock enabled.

Acceptance criteria

  • create-bucket accepts file-lock-enabled.
  • When true, the action passes fileLockEnabled: true to the SDK create call.
  • The created bucket summary reports Object Lock status from fileLockConfiguration.
  • Documentation warns that Object Lock cannot be enabled retroactively on existing buckets.
  • Tests cover creating with and without file lock enabled.

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    control-planeBucket administration / provisioning (scope decision)enhancementNew feature or requestsdk-paritySDK capability not yet exposed by the actionsecuritySecurity hardening or vulnerability

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions