Skip to content

GCP Storage

Andy Potanin edited this page Jun 21, 2026 · 1 revision

Creates a Google Cloud Storage bucket with configurable lifecycle rules and versioning.

Use this module when a Rabbit service needs a GCS bucket for media storage, backups, or other object storage needs.

Supported Features

  • GCS bucket creation.
  • Object versioning.
  • Lifecycle rules with storage class transitions.
  • Uniform bucket-level access.
  • Custom labels.

Prerequisites

  • GCP credentials with permission to manage Cloud Storage buckets.

Important Notes

  • bucket_name must be globally unique across all GCP projects.
  • The default lifecycle rule transitions objects to ARCHIVE storage class after 30 days.
  • This module uses Terraform variables directly instead of a YAML configurations block.

Minimal Example

services:
  - name: "GCP Storage"
    module: "gcp-storage"
    id: "storage-bucket"
    deployment_order: 25
    configurations:
      bucket_name: "my-project-media"
      region: "US"

Outputs

Output Description
bucket_name The name of the created bucket.
bucket_url The gs:// URL of the created bucket.

Full Configuration Schema

This module uses Terraform variables directly instead of a YAML configurations block.

Field Type Required Description
bucket_name string No Bucket name. Defaults to rabbit-automation-action-bucket.
region string No Bucket location. Defaults to US.
storage_class string No Storage class. Defaults to NEARLINE.
versioning boolean No Enables object versioning. Defaults to true.
lifecycle_rule object No Lifecycle rule configuration.
lifecycle_rule.action.type string No Lifecycle action type. Defaults to SetStorageClass.
lifecycle_rule.action.storage_class string No Target storage class. Defaults to ARCHIVE.
lifecycle_rule.condition.age number No Object age in days to trigger the rule. Defaults to 30.
uniform_bucket_level_access boolean No Enables uniform bucket-level access. Defaults to false.
labels map[string] No Labels applied to the bucket.

Clone this wiki locally