wb resource create gcs-bucket
Categories:
Name
wb-resource-create-gcs-bucket - Add a controlled GCS bucket.
Synopsis
wb resource create gcs-bucket [--access=<access>] [--bucket-name=<bucketName>] [--cloning=<cloning>] [--description=<description>] [--format=<format>] [--location=<location>] [--storage=<storageClass>] [--workspace=<id>] (--id=<id>) [--lifecycle=<pathToLifecycleFile> | --auto-delete=<autoDelete>]
Description
Add a controlled GCS bucket resource.
Lifecycle rules
GCS bucket lifecycle rules are specified by passing a JSON-formatted file path to the wb resource create gcs-bucket command.
The expected JSON structure matches the one used by the gsutil lifecycle command. This structure is a subset of the GCS resource specification.
There is a command shortcut for specifying a lifecycle rule which deletes any objects more than N days old: wb resource create gcs-bucket --id=mybucket --bucket-name=mybucket --auto-delete=365
Options
-
--access=<access>
Access scope for the resource.Valid values: SHARED_ACCESS, PRIVATE_ACCESS
Default: SHARED_ACCESS -
--auto-delete=<autoDelete>
Number of days after which to auto-delete the objects in the bucket. This option is a shortcut for specifying a lifecycle rule that auto-deletes objects in the bucket after some number of days. -
--bucket-name=<bucketName>
Name of the GCS bucket, without the prefix. (e.g.,my-bucket, notgs://my-bucket). If not provided, a unique bucket name will be generated. -
--cloning=<cloning>
Instructions for handling when cloning the workspace.Valid values: COPY_NOTHING, COPY_DEFINITION, COPY_RESOURCE, COPY_REFERENCE, COPY_LINK_REFERENCE
Default: COPY_RESOURCE -
--description=<description>
Description of the resource. -
--format=<format>
Set the format for printing command output. Defaults to the config format property.Valid values: JSON, TEXT
Default: null -
--id=<id>
ID of the resource, scoped to the workspace. Only use letters, numbers, dashes, and underscores. -
--lifecycle=<pathToLifecycleFile>
Lifecycle rules specified in a JSON-formatted file. See the README for the expected JSON format. -
--location=<location>
The Google Cloud location of the bucket.Default: US-CENTRAL1 -
--storage=<storageClass>
Storage class.Valid values: STANDARD, NEARLINE, COLDLINE, ARCHIVE
-
--workspace=<id>
Workspace ID to use for this command only.
Last Modified: 13 November 2025