Google Cloud Storage (GCS) CreateBucket

Google Cloud Storage (GCS) CreateBucket

Certified

Create or update a GCS bucket

Creates a new bucket with provided settings. If the bucket exists, behavior follows ifExists (default ERROR; UPDATE applies changes; SKIP leaves it).

yaml
type: io.kestra.plugin.gcp.gcs.CreateBucket

Create a new bucket with some options

yaml
id: gcp_gcs_create_bucket
namespace: company.team

tasks:
  - id: create_bucket
    type: io.kestra.plugin.gcp.gcs.CreateBucket
    name: "my-bucket"
    versioningEnabled: true
    labels:
      my-label: my-value
Installation

Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:

kestractl plugins get io.kestra.plugin:plugin-gcp --compatible-for $KESTRA_VERSION

For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.

For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.

Properties

Bucket name

Globally unique bucket ID

ACL

Bucket-level access control list

Definitions
entity*

The entity

type*string
Possible Values
DOMAINGROUPUSER

The type of the entity (USER, GROUP or DOMAIN)

value*string

The value for the entity (ex : user email if the type is USER ...)

role*string
Possible Values
READERWRITEROWNER

The role to assign to the entity

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

CORS rules

Cross-Origin Resource Sharing configuration

Definitions
maxAgeSecondsinteger
methodsarray
SubTypestring
Possible Values
GETHEADPUTPOSTDELETEOPTIONS
originsarray
valuestring
responseHeadersarray
SubTypestring

Default object ACL

Default ACL applied to new objects

Definitions
entity*

The entity

type*string
Possible Values
DOMAINGROUPUSER

The type of the entity (USER, GROUP or DOMAIN)

value*string

The value for the entity (ex : user email if the type is USER ...)

role*string
Possible Values
READERWRITEROWNER

The role to assign to the entity

Default event-based hold

If true, new objects are event-based held

Default KMS key

IAM configuration

Uniform bucket-level access and related settings

Definitions
publicAccessPreventionstring
Possible Values
ENFORCEDUNSPECIFIEDUNKNOWNINHERITED
uniformBucketLevelAccessEnabledboolean
DefaultERROR
Possible Values
ERRORUPDATESKIP

Existing bucket policy

ERROR by default; UPDATE to apply new settings; SKIP to leave as-is.

The GCP service account to impersonate

Website index page

Served as directory index for static website hosting

Labels

Lifecycle rules

List of lifecycle actions and conditions (age/delete/storage class supported)

Definitions
action*

The action to take when a lifecycle condition is met

type*string
Possible Values
DELETESET_STORAGE_CLASS

The type of the action (DELETE ...)

valuestring

The value for the action (if any)

condition*

The condition

age*integerstring

The Age condition is satisfied when an object reaches the specified age (in days). Age is measured from the object's creation time

Location

Bucket data location (region or dual-region)

Logging

Destination bucket and prefix for access logs

Definitions
logBucketstring
logObjectPrefixstring

Website not-found page

Custom 404 page for static website hosting

The GCP project ID

Requester pays

If true, requester bears access egress charges

Retention period (seconds)

Bucket retention duration; can be reduced only if policy is unlocked

SubTypestring
Default["https://www.googleapis.com/auth/cloud-platform"]

The GCP scopes to be used

The GCP service account

When unset or rendered to an empty value, Application Default Credentials are used (e.g. GOOGLE_APPLICATION_CREDENTIALS or the runtime's attached identity).

Possible Values
REGIONALMULTI_REGIONALNEARLINECOLDLINESTANDARDARCHIVEDURABLE_REDUCED_AVAILABILITY

Storage class

Bucket storage class (cost/SLA); see Cloud Storage docs for values

Versioning enabled

Enable object versioning; if true, previous versions are retained

Audience of the Workload Identity Federation provider

The full resource name of the workload identity pool provider, //iam.googleapis.com/projects/<number>/locations/global/workloadIdentityPools/<pool>/providers/<provider>. Required with workloadIdentityToken, and must match the aud claim of the token.

OIDC token for Workload Identity Federation

When set together with workloadIdentityAudience, the token is exchanged at Google STS for federated credentials and no service account key is needed: Google verifies it against the identity provider that issued it. Use {{ oidcToken(audience='…') }} to have Kestra Enterprise mint one for the running execution. Combine with impersonatedServiceAccount to act as a service account the pool may impersonate, and set projectId explicitly since no key file carries it. Cannot be combined with serviceAccount.

The bucket's info

Definitions
indexPagestring

The bucket's website index page

locationstring

The bucket's location

namestring

The bucket's unique name

notFoundPagestring

The custom object to return when a requested resource is not found

uristring
Formaturi

The bucket's URI

Defaultfalse

If the bucket was created

Defaultfalse

If the bucket was updated