Event Source for Google Cloud Billing
A Service Account is required to authenticate the event source and allow it to interact with Google Cloud Billing budget.
The service account must be granted an IAM Role with at least the following permissions:
The following set of permissions is also required to allow this source to manage the Pub/Sub topic and subscription:
roles/pubsub.editor roles are an example of roles that are suitable for use with the TriggerMesh event
source for Google Cloud Billing.
Create a key for this service account and save it. This key must be in JSON format. It is required to be able to run an instance of the Google Cloud Billing event source.
Deploying an Instance of the Source
- Billing Account ID: The identifier for the Cloud Billing account owning the budget. For example, 01D4EE-079462-DFD6EC.
- Budget ID: The identifier for the Cloud Billing budget. You can locate the budget's ID in your budget under "Manage notifications". The ID is displayed after you select Connect a Pub/Sub topic to this budget. For example, de72f49d-779b-4945-a127-4d6ce8def0bb.
Open the Bridge creationg screen and add a source of type Google Cloud Billing.
In the Source creation form, give a name to the event source and add the required parameters:
After clicking the Save button, you will be taken back to the Bridge editor. Proceed to adding the remaining components to the Bridge, then submit it.
A ready status on the main Bridges page indicates that the event source is ready to consume messages from the Billing budget configured.
The TriggerMesh event source for Google Cloud Billing emits events of the following type:
Because the Google Cloud Billing API doesn't allow disabling a Budget's notifications programmatically, budget notifications will remain enabled even after the deletion of the event source. The destination Pub/Sub topic will nevertheless be deleted, effectively causing the interruption of budget notifications.