GCloudCLI icon
If icon
SlackIncomingWebhook icon
Schedule icon

Google Cloud Storage (GCS) Bucket Lifecycle Policy Drift Sentinel

Audits Google Cloud Storage bucket lifecycle configurations to detect missing object expiration rules and prevent cost leaks.

Categories
BusinessCloud

How it works

This workflow executes gcloud storage buckets describe to inspect the lifecycle.rule block of the target GCS bucket. In cloud data architectures, buckets designated for intermediate staging, access logs, or temporary pipeline exports often lack lifecycle management. Without automated Delete actions after 30 or 90 days, terabytes of dead data accumulate, driving up recurring cloud storage bills. Slack is alerted when expiration rules are absent.

What you get

  • Continuous FinOps audit of Google Cloud Storage bucket lifecycle configurations.
  • Prevents runaway object accumulation in temporary and staging buckets.
  • Enforces corporate data retention hygiene and compliance policies.

Who it's for

  • FinOps Practitioners and Cloud Economics Engineers managing GCP spend.
  • Data Engineers and Platform Administrators managing GCS data lakes.

Why orchestrate this with Kestra

  • Native GCloud Storage Integration: Queries bucket metadata securely without custom Python code.
  • Continuous Compliance: Detect policy drift introduced by manual bucket creations or Terraform gaps.
  • Actionable Guidance: Direct alerts provide immediate recommendations for lifecycle configuration.

Prerequisites

  • Google Cloud Storage bucket accessible via service account.
  • Secrets GCP_SERVICE_ACCOUNT and SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import the blueprint.
  2. Configure project ID and target bucket name.
  3. Run the workflow to verify lifecycle rule enforcement.

How to extend

  • Automatically apply a standard 30-day deletion rule via gcloud storage buckets update.
  • Audit all buckets in a GCP project dynamically using a loop task.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.