Eventarc Pub/Sub Trigger
An Eventarc Pub/Sub trigger wired into a self-contained pipeline — a Cloud Run target, a dedicated delivery service account, and the run.invoker and eventReceiver grants Eventarc silently requires.
Verification
Live-testedReally deployed, verified, idempotent and destroyed in a cloud sandbox.
Conformance
- Static validation (fmt · validate · tflint)
- Security scan (Checkov)
- Plan tests (mocked: validation rules · outputs)
Provenance
- SHA-256 checksum
- Signature (pending)
Functional
- Live-tested — applied, verified, destroyed
Last verified 2026-06-30 · how we verify
Documentation
gcp-eventarc
An Eventarc Pub/Sub trigger wired into a self-contained event pipeline: a
Cloud Run service target (created by the module by default), a dedicated trigger
service account, and the two IAM grants Eventarc silently requires —
roles/run.invoker on the destination and roles/eventarc.eventReceiver on the
project. Without those grants the trigger applies but never delivers an event.
Works with Terraform and OpenTofu (>= 1.6), Google provider
>= 7.0, < 8.0.
For the google.cloud.pubsub.topic.v1.messagePublished event type Eventarc
auto-provisions (and tears down) the backing Pub/Sub topic and subscription —
publish to the topic exported as pubsub_topic to fire events.
What you get per module call:
- An Eventarc trigger on Pub/Sub message-published events
- A dedicated trigger service account (least privilege)
run.invoker+eventarc.eventReceivergrants for that account- A Cloud Run destination service created inline (or route to an existing one)
Requirements
| Requirement | Version |
|---|---|
| Terraform / OpenTofu | >= 1.6 |
hashicorp/google | >= 7.0, < 8.0 |
The Eventarc (eventarc.googleapis.com), Pub/Sub (pubsub.googleapis.com) and
Cloud Run (run.googleapis.com) APIs must be enabled on the project. Eventarc
manages the Pub/Sub-service-agent token-creator grant it needs for authenticated
push on its own.
Verification
Static-validated (fmt, validate, tflint). Live apply/destroy testing pending cloud sandbox availability — see catalog status.
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