- Google Cloud Billing
- Google Cloud Pub/Sub
- Google Cloud Functions
- Slack Incoming Webhook
- Go to Google Cloud Functions
- Give a name and minimal spec
- Select Trigger as Pub/Sub
- Create a new topic
- Select Inline editor for now
- Select Runtime Nodejs
- Paste the
index.js
andpackage.json
content on respective text area - Enter the corresponding function to execute: subscribe
- Expand
More
and giveSLACK_WEBHOOK_URL
environment variable which is slack incoming webhook url - Create the function
- Create a budget from Budgets and alerts of Google Cloud Console
- At the bottom on
Manage notifications
, connect to the Pub/Sub topic create above and we are done
It will send the budget amount along with the expenses to slack channel
- Google Cloud Billing
- Google Cloud Pub/Sub
- Google Cloud Functions
- Slack Incoming Webhook
- Acesse [Google Cloud Functions] (https://console.cloud.google.com/functions/add)
- Dê um nome e especificações mínimas
- Selecione Trigger como Pub/Sub
- Crie um new topic
- Selecione Inline editor por enquanto
- Selecione Runtime Nodejs
- Cole o conteúdo
index.js
epackage.json
na respectiva área de texto - Digite a function correspondente para executar: subscribe
- Expanda
More
e forneça a variável de ambienteSLACK_WEBHOOK_URL
, que é uma URL de webhook de entrada - Crie a function
- Crie um orçamento em [Orçamentos e alertas] (https://console.cloud.google.com/billing) do Google Cloud Console
- Na parte inferior de
Gerenciar notificações
, conecte-se ao tópico Pub / Sub criado acima e pronto
Ele enviará o valor do orçamento, juntamente com as despesas, para canalizar