https://github.com/unitvectory-labs/firepubauditsource-tofu
A module for OpenTofu that deploys firepubauditsource to GCP Cloud Run, along with configuring essential services including Eventarc for Firestore and Pub/Sub.
https://github.com/unitvectory-labs/firepubauditsource-tofu
tofu
Last synced: 3 months ago
JSON representation
A module for OpenTofu that deploys firepubauditsource to GCP Cloud Run, along with configuring essential services including Eventarc for Firestore and Pub/Sub.
- Host: GitHub
- URL: https://github.com/unitvectory-labs/firepubauditsource-tofu
- Owner: UnitVectorY-Labs
- License: apache-2.0
- Created: 2024-10-29T23:40:39.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-21T11:58:27.000Z (3 months ago)
- Last Synced: 2026-02-21T18:16:24.227Z (3 months ago)
- Topics: tofu
- Language: HCL
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://opensource.org/licenses/Apache-2.0) [](https://guide.unitvectorylabs.com/bestpractices/status/#work-in-progress)
# firepubauditsource-tofu
A module for OpenTofu that deploys firepubauditsource to GCP Cloud Run, along with configuring essential services including Eventarc for Firestore and Pub/Sub.
## References
- [firepubauditsource](https://github.com/UnitVectorY-Labs/firepubauditsource) - Publishes Firestore data changes to Pub/Sub as JSON audit records for downstream processing.
- [firepubauditsource-tofu](https://github.com/UnitVectorY-Labs/firepubauditsource-tofu) - A module for OpenTofu that deploys firepubauditsource to GCP Cloud Run, along with configuring essential services including Eventarc for Firestore and Pub/Sub.
- [bqpubauditsink](https://github.com/UnitVectorY-Labs/bqpubauditsink) - Ingests Pub/Sub audit JSON events and inserts the records into BigQuery.
- [bqpubauditsink-tofu](https://github.com/UnitVectorY-Labs/bqpubauditsink-tofu) - A module for OpenTofu that deploys bqpubauditsink to GCP Cloud Run, along with configuring essential services including the Pub/Sub subscription and BigQuery dataset and table.
## Usage
```hcl
module "firepubauditsource" {
source = "git::https://github.com/UnitVectorY-Labs/firepubauditsource-tofu.git?ref=main"
name = "firepub"
project_id = var.project_id
region = var.region
artifact_registry_host = "us-docker.pkg.dev"
artifact_registry_name = "ghcr"
artifact_registry_project_id = var.project_id
firepubauditsource_tag = "dev"
database = "(default)"
database_region = "nam5"
}
```
## Requirements
| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.0.0 |
## Providers
| Name | Version |
|------|---------|
| [google](#provider\_google) | n/a |
## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [google_cloud_run_service_iam_member.invoke_permission](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_service_iam_member) | resource |
| [google_cloud_run_v2_service.firepubauditsource](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/cloud_run_v2_service) | resource |
| [google_eventarc_trigger.firestore_trigger](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/eventarc_trigger) | resource |
| [google_project_iam_member.eventarc_event_receiver_role](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_iam_member) | resource |
| [google_project_service.eventarc](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_service) | resource |
| [google_project_service.firestore](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_service) | resource |
| [google_project_service.pubsub](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_service) | resource |
| [google_project_service.run](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/project_service) | resource |
| [google_pubsub_topic.firepubauditsource_topic](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_topic) | resource |
| [google_pubsub_topic_iam_member.pubsub_publisher_role](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/pubsub_topic_iam_member) | resource |
| [google_service_account.cloud_run_sa](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |
| [google_service_account.eventarc_sa](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/service_account) | resource |
## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [artifact\_registry\_host](#input\_artifact\_registry\_host) | The name of the Artifact Registry repository | `string` | `"us-docker.pkg.dev"` | no |
| [artifact\_registry\_name](#input\_artifact\_registry\_name) | The name of the Artifact Registry repository | `string` | n/a | yes |
| [artifact\_registry\_project\_id](#input\_artifact\_registry\_project\_id) | The project to use for Artifact Registry. Will default to the project\_id if not set. | `string` | `null` | no |
| [database](#input\_database) | The Firestore database to monitor for changes | `string` | n/a | yes |
| [database\_region](#input\_database\_region) | The Firestore database to monitor's region | `string` | n/a | yes |
| [firepubauditsource\_tag](#input\_firepubauditsource\_tag) | The tag for the firepubauditsource image to deploy | `string` | `"dev"` | no |
| [name](#input\_name) | The name of the application (used for Cloud Run & Pub/Sub) | `string` | n/a | yes |
| [project\_id](#input\_project\_id) | The GCP project id | `string` | n/a | yes |
| [region](#input\_region) | The GCP region to deploy resources to | `string` | n/a | yes |
## Outputs
No outputs.