Configure a Cloud Storage bucket

In Application Design Center, you can configure a Cloud Storage bucket to store and retrieve unstructured object data for workloads such as serving website content, archival and disaster recovery, or distributing large objects. You can customize the bucket's component connections and configuration parameters based on the terraform-google-cloud-storage Terraform module on GitHub.

Component connections

The following table includes the components that you can connect to a Cloud Storage bucket, and the resulting updates to your application and its generated Terraform code.

Connected component Application updates Background information

Compute Engine instance template

  • The Compute Engine instances can control bucket objects, including listing, creating, viewing, and deleting objects.
  • The roles/storage.objectAdmin role is granted to the Compute Engine instance template service account.
Set and manage Identity and Access Management (IAM) policies on buckets

Service account

  • The service account can manage objects in the Cloud Storage bucket.
  • The service account IAM information is added to the Cloud Storage bucket.
  • The roles/storage.objectAdmin role is granted to the service account.
Set and manage IAM policies on buckets

Cloud Run

  • The Cloud Run service can manage objects in the Cloud Storage bucket.
  • The Cloud Run service account IAM information is added to the Cloud Storage bucket.
  • The roles/storage.objectAdmin role is granted to the Cloud Run service account.
Connect to Google Cloud services

Pub/Sub

  • The Pub/Sub subscription can write messages to the Cloud Storage bucket.
  • The Cloud Storage bucket information is added to the Pub/Sub subscription fields.
Cloud Storage subscriptions

Required configuration parameters

If your template includes a Cloud Storage component, you must configure the following parameters before you deploy.

Parameter name Description and constraints Background information

Project ID

The project where you want to deploy the Cloud Storage resource.

Configure components

Region

location Bucket locations

Name

name Bucket Names

Optional configuration parameters

The following parameters are optional. To display advanced parameters, in the Configuration area, select Show advanced fields.

Feature Parameter name Description and constraint information Background information

Storage Class

storageClass Storage Classes

Bucket Policy Only

iamConfiguration.uniformBucketLevelAccess Uniform bucket-level access

Versioning

versioning.enabled Object versioning

Autoclass

autoclass.enabled Autoclass
Retention Policy

Is Locked

retentionPolicy.isLocked Bucket Lock
Retention Policy

Retention period

retentionPolicy.retentionPeriod Retention policy
Encryption

Default KMS Key Name

encryption.defaultKmsKeyName Use customer-managed encryption keys
Lifecycle Rules

Type

lifecycle.rule[].action.type Object Lifecycle Management
Lifecycle Rules

Storage Class

lifecycle.rule[].action.storageClass setStorageClass
Lifecycle Rules

Age

lifecycle.rule[].condition.age age
Lifecycle Rules

Send Age If Zero

send_age_if_zero lifecycle_rules
Lifecycle Rules

Created Before

lifecycle.rule[].condition.createdBefore createdBefore
Lifecycle Rules

With State

with_state lifecycle_rules
Lifecycle Rules

Matches Storage Class

lifecycle.rule[].condition.matchesStorageClass[] matchesStorageClass
Lifecycle Rules

Matches Prefix

lifecycle.rule[].condition.matchesPrefix[] matchesPrefix and matchesSuffix
Lifecycle Rules

Matches Suffix

lifecycle.rule[].condition.matchesSuffix[] matchesPrefix and matchesSuffix
Lifecycle Rules

Num Newer Versions

lifecycle.rule[].condition.numNewerVersions numNewerVersions
Lifecycle Rules

Custom Time Before

lifecycle.rule[].condition.customTimeBefore customTimeBefore
Lifecycle Rules

Days Since Custom Time

lifecycle.rule[].condition.daysSinceCustomTime daysSinceCustomTime
Lifecycle Rules

Days Since Noncurrent Time

lifecycle.rule[].condition.daysSinceNoncurrentTime daysSinceNoncurrentTime
Lifecycle Rules

Noncurrent Time Before

lifecycle.rule[].condition.noncurrentTimeBefore noncurrentTimeBefore
Internal Encryption Config

Create Encryption Key

To create a Cloud Key Management Service key ring and key, select the checkbox. Customer-managed encryption keys
Internal Encryption Config

Prevent Destroy

To prevent the destruction of the Cloud KMS key, select the checkbox. Key versions and locked objects
Internal Encryption Config

Key Destroy Scheduled Duration

destroyScheduledDuration Key versions and locked objects
Internal Encryption Config

Key Rotation Period

rotationPeriod Key rotation

Force Destroy

To delete all contained objects when you delete a bucket, select the checkbox.

force_destroy
IAM Members

Role

The collection of permissions that you want to grant.

Set and manage IAM policies on buckets
IAM Members

Member

The principals that are granted the role.

Set and manage IAM policies on buckets
Labels

Key

labels Tags and labels
Labels

Value

labels Tags and labels
Custom Placement Config

Data Locations

customPlacementConfig.dataLocations[] Dual-regions
CORS

Origin

cors[].origin[] Cross-origin resource sharing (CORS)
CORS

Method

cors[].method[] How CORS works
CORS

Response Header

cors[].responseHeader[] Components of a CORS configuration
CORS

Max Age Seconds

cors[].maxAgeSeconds Components of a CORS configuration

Log Bucket

logging.logBucket Usage logs and storage logs

Log Object Prefix

logging.logObjectPrefix Usage logs and storage logs
Website

Main Page Suffix

website.mainPageSuffix Recommended: assign specialty pages
Website

Not Found Page

website.notFoundPage Recommended: assign specialty pages

Public Access Prevention

iamConfiguration.publicAccessPrevention Public access prevention
Soft Delete Policy

Retention Duration Seconds

softDeletePolicy.retentionDurationSeconds Soft delete