-
Notifications
You must be signed in to change notification settings - Fork 0
GCP Storage
udx-github edited this page Oct 3, 2026
·
5 revisions
Creates a Google Cloud Storage bucket with configurable lifecycle rules, CORS, website hosting, autoclass, and versioning.
Use this module when a Rabbit service needs a GCS bucket for media storage, backups, static site hosting, or other object storage needs.
- GCS bucket creation.
- Object versioning.
- Multiple lifecycle rules per bucket, with
DeleteandSetStorageClassactions and the full GCS condition set (age, noncurrent versions, storage class matches, and more). - CORS configuration.
- Static website hosting configuration.
- Autoclass automatic storage class management.
- Uniform bucket-level access and public access prevention.
- Custom labels.
- GCP credentials with permission to manage Cloud Storage buckets.
-
bucket_namemust be globally unique across all GCP projects. - Buckets get no lifecycle rule unless one is declared.
-
autoclasscannot be enabled together withSetStorageClasslifecycle rules, and it requires theSTANDARDdefault storage class; the plan fails on either combination. - A
Deletelifecycle action must not setstorage_class; aSetStorageClassaction requires it. The plan fails fast on either mistake. - The 6.9.x singular
lifecycle_rulekey is still accepted whenlifecycle_rulesis absent; new manifests should use thelifecycle_ruleslist. - Public Rabbit service YAML inputs are provided under
configurations:.
services:
- name: "GCP Storage"
module: "gcp-storage"
id: "storage-bucket"
deployment_order: 14
configurations:
bucket_name: "my-project-media"
region: "US"services:
- name: "GCP Storage"
module: "gcp-storage"
id: "storage-bucket"
deployment_order: 14
configurations:
bucket_name: "my-project-media"
region: "US"
storage_class: "STANDARD"
lifecycle_rules:
- action:
type: "SetStorageClass"
storage_class: "NEARLINE"
condition:
age: 90
matches_storage_class: ["STANDARD"]
- action:
type: "Delete"
condition:
num_newer_versions: 3
with_state: "ARCHIVED"| Output | Description |
|---|---|
bucket_name |
The name of the created bucket. |
bucket_url |
The gs:// URL of the created bucket. |
The fields below are public module inputs under configurations:.
| 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, or STANDARD when autoclass is enabled. |
versioning |
boolean | No | Enables object versioning. Defaults to true. |
lifecycle_rules |
list[object] | No | Lifecycle rules. Defaults to no rules. |
lifecycle_rules[].action.type |
string | Yes |
Delete or SetStorageClass. |
lifecycle_rules[].action.storage_class |
string | No | Target class. Required for SetStorageClass, rejected for Delete. |
lifecycle_rules[].condition.age |
number | No | Object age in days. |
lifecycle_rules[].condition.created_before |
string | No | Date (YYYY-MM-DD). |
lifecycle_rules[].condition.with_state |
string | No |
LIVE, ARCHIVED, or ANY. |
lifecycle_rules[].condition.matches_storage_class |
list[string] | No | Storage classes the rule applies to. |
lifecycle_rules[].condition.matches_prefix |
list[string] | No | Object name prefix filters. |
lifecycle_rules[].condition.matches_suffix |
list[string] | No | Object name suffix filters. |
lifecycle_rules[].condition.num_newer_versions |
number | No | Noncurrent version count. |
lifecycle_rules[].condition.custom_time_before |
string | No | Date (YYYY-MM-DD). |
lifecycle_rules[].condition.days_since_custom_time |
number | No | Days since a custom timestamp. |
lifecycle_rules[].condition.days_since_noncurrent_time |
number | No | Days since an object became noncurrent. |
lifecycle_rules[].condition.noncurrent_time_before |
string | No | Date (YYYY-MM-DD) cutoff for when an object became noncurrent. |
cors |
list[object] | No | CORS entries. |
cors[].origin |
list[string] | No | Allowed origins. |
cors[].method |
list[string] | No | Allowed HTTP methods. |
cors[].response_header |
list[string] | No | Allowed response headers. |
cors[].max_age_seconds |
number | No | Preflight cache duration. |
website |
object | No | Static website hosting configuration. |
website.main_page_suffix |
string | No | Index document. |
website.not_found_page |
string | No | 404 document. |
autoclass |
object | No | Autoclass configuration. Conflicts with SetStorageClass rules. |
autoclass.enabled |
boolean | No | Enables autoclass. |
autoclass.terminal_storage_class |
string | No | Terminal class (NEARLINE or ARCHIVE). |
uniform_bucket_level_access |
boolean | No | Enables uniform bucket-level access. Defaults to false. |
public_access_prevention |
string | No |
inherited or enforced. Defaults to the GCP project setting. |
requester_pays |
boolean | No | Enables requester pays. Defaults to false. |
force_destroy |
boolean | No | Deletes contained objects when the bucket is destroyed. Defaults to false. |
labels |
map[string] | No | Labels applied to the bucket. |
- AWS ACM Certificate
- AWS CloudFormation Stack
- AWS CloudFront Distribution
- AWS CloudFront Response Headers Policy
- AWS Route53 DNS
- AWS WAF
- Elasticsearch
- GCP Cloud Function
- GCP Cloud Run
- GCP Cloud Scheduler
- GCP Firebase Realtime Database (
gcp-firebase-rtdb) - GCP Firestore Database (
gcp-firestore) - GCP GKE Cluster
- GCP GKE Node Pool
- GCP IAM
- GCP Monitoring
- GCP Networking
- GCP PostgreSQL Instance
- GCP Pub/Sub
- GCP Secret Manager
- GCP Service Account
- GCP SQL Instance
- GCP Static IP
- GCP Storage
- Ghost Inspector Sync
- K8s Access
- K8s ARC Controller
- K8s ARC Runner
- K8s ConfigMap
- K8s Deployment
- K8s HPA
- K8s HTTP Gateway Route
- K8s HTTP Health Check Policy
- K8s Memcached
- K8s Namespace
- K8s PDB
- K8s Secret
- K8s Service
- K8s Shared HTTP Gateway
- NewRelic APM Browser
- NewRelic Synthetic Monitors