Skip to main content
Providers

CloudStorageBucket

A resource of the GCP provider, version 0.2.0, in its Storage group. Import it with:

import CloudStorageBucket from "gcp/storage"

Example

resource CloudStorageBucket example {
    name                     = "example-value"
    location                 = "US"
    storageClass             = "STANDARD"
    versioning               = false
    labels                   = "..."
    uniformBucketLevelAccess = true
}

Properties

Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.

NameTypeDefaultRequiredDescription
namestring—NoGlobally unique bucket name
locationstring"US"NoThe location of the bucket (e.g., US, EU, us-central1)
storageClassstring"STANDARD"NoThe storage class for the bucket Allowed: "STANDARD", "NEARLINE", "COLDLINE", "ARCHIVE"
versioningbooleanfalseNoEnable object versioning
labelsobject—NoLabels to apply to the bucket
uniformBucketLevelAccessbooleantrueNoWhether uniform bucket-level access is enabled

Set by GCP after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.

NameTypeImportableDescription
selfLinkstringYesThe self-link URL of the bucket
timeCreatedstringNoThe creation time of the bucket

On this page