IaC Bazaar
Google CloudLive-tested

Cloud Monitoring, Alerting & Log Export

A self-contained observability bundle: a metric-threshold alert policy, a Monitoring dashboard, and a log-export sink to a locked-down GCS bucket with the sink writer-identity IAM grant wired in.

terraformGoogle Cloud#gcp

Part of: GCP Production Landing Zone

gcp-monitoringterraform v1.7

Verification

Live-tested

Really deployed to a cloud sandbox, verified against its outputs and assertions, then destroyed - with the teardown confirmed.

Conformance

  • Static validation (fmt · validate · tflint)
  • Security scan clean (Checkov)
  • Plan test superseded by live test

Provenance

Functional

  • Live-tested - applied, verified, destroyed

Last verified 2026-06-30 · how we verify

Verify this download

cosign · sha-256

Don't take our word for it. Every release is signed with cosign - check the bytes against our pinned public key before you trust them.

# 1. Our pinned public key - fetch once, trust out-of-band
curl -O https://www.iac-bazaar.com/cosign.pub

# 2. This module's Sigstore bundle
curl -o gcp-monitoring-1.0.0.sigstore.json \
  https://www.iac-bazaar.com/api/artifacts/gcp-monitoring/signature

# 3. Verify the tarball you downloaded
cosign verify-blob \
  --key cosign.pub \
  --bundle gcp-monitoring-1.0.0.sigstore.json \
  gcp-monitoring-1.0.0.tar.gz
# → Verified OK

# 4. (optional) confirm the checksum too
echo "59be3463a2b991bc1c62908c23e4c8f3c23de403da4774ae788d6bf66c13247f  gcp-monitoring-1.0.0.tar.gz" | sha256sum -c

Use it from the registry

terraform · opentofu
module "monitoring" {
  source  = "www.iac-bazaar.com/iac-bazaar/gcp-monitoring/gcp"
  version = "1.0.0"
}

Paid module — needs a purchase (or a subscription that covers it) plus a registry token from /account/tokens. Full setup: registry docs.

Inputs & outputs

Create a free account to read this module's contract

The declared contract — every input name, type, default and description, plus every output — is shown to signed-in accounts, not to anonymous visitors.

A free account sees the contract of every Free module. This one is Professional, so its contract unlocks when you buy it.

Documentation

gcp-monitoring

A standalone Cloud Operations (observability) bundle that applies on its own with nothing pre-existing: a metric-threshold alert policy, a Cloud Monitoring dashboard, and a log-export sink that ships matching log entries to a dedicated, locked-down GCS bucket the module creates. Works with Terraform and OpenTofu (>= 1.6), Google provider >= 7.0, < 8.0.

The grant hand-rolled sink configs always miss is wired in: the sink runs as its own unique writer identity, and that identity is granted objectCreator on the destination bucket — without it the export silently writes nothing. The bucket has uniform bucket-level access, public-access prevention, and a lifecycle rule so exported logs age out.

What you get per module call:

  • A GCS log-export bucket (UBLA, public access prevented, lifecycle expiry)
  • A project log sink with a unique writer identity + the bucket IAM grant
  • A metric-threshold alert policy (CPU-utilization by default; fully overridable)
  • A dashboard (minimal CPU dashboard by default; supply your own dashboard_json)

Requirements

RequirementVersion
Terraform / OpenTofu>= 1.6
hashicorp/google>= 7.0, < 8.0

The Monitoring (monitoring.googleapis.com) and Logging (logging.googleapis.com) APIs must be enabled on the project.

License

Commercial — IaC Bazaar EULA. © IaC Bazaar. Original work (not derived from a third-party module).

Usage code & full reference unlock after purchase

The complete copy-paste usage, the full input/output reference, and operational notes ship with your licence - shown here and bundled in the download.

  • Usage
  • Inputs
  • Outputs