Google Cloud Persistent Disk inventory

Manage disk usage and lifecycle.

Description

This entry lists a Compute Engine Persistent Disk declared in Terraform.

Potential impact

A detached disk can keep accruing charges. A disk missing from a snapshot schedule may have no recovery point.

Remediation

Record the owner and attached workloads. Check the encryption key, snapshot schedule and how long the disk and snapshots are needed.

Examples

The labels identify the billing service and prod environment. Check snapshot and encryption settings on the disk.

Before

hcl
resource "google_compute_disk" "data" {
  name = "data-disk"
  type = "pd-ssd"
  zone = "us-central1-a"
}

After

hcl
resource "google_compute_disk" "data" {
  name = "data-disk"
  type = "pd-ssd"
  zone = "us-central1-a"

  labels = {
    service = "billing"
    env     = "prod"
  }
}

References