Skip to main content

Bucket

Provides a bucket storage for a project.

Examples

Simple Bucket

provider.storage.makeBucket({
name: "myuniquebucketname",
properties: () => ({ storageClass: "STANDARD" }),
});

Static Website Bucket

provider.storage.makeBucket({
name: "demo.yourwebsite.com",
properties: () => ({
iamConfiguration: {
uniformBucketLevelAccess: {
enabled: true,
},
},
iam: {
bindings: [
{
role: "roles/storage.objectViewer",
members: ["allUsers"],
},
],
},
website: { mainPageSuffix: "index.html", notFoundPage: "404.html" },
}),
});

Example Code

Properties

See Bucket create properties

Used By