Skip to content

sakimyto/slack-notifications-for-gcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slack-notifications-for-gcp / salckにGCP消化予算を通知する

Getting Started / スタートガイド

Prerequisites / 必要なもの

  • GCP
    • Google Cloud Billing
    • Google Cloud Pub/Sub
    • Google Cloud Functions
  • Python 3.9
  • Slack bot

Installing / インストール

1.Setting budget and alerts with Pub/Sub topics in GCP

GCP billing

2. Creat a slack bot in slack api

  1. Access to Slack API and creat a bot
  2. In "App Home" Add, "App Display Name"
  3. In "OAuth & Permissions" > "Scopes" > "Bot Token Scopes", set chat:write "Send messages as ~"
  4. "Install App to Workspace"
  5. Copy "Bot User OAuth Access Token"

3. Deploy main.py to CloudFunction

  • Set BOT_ACCESS_TOKEN, CHANNEL_ID vars
  • Set cloud Pub/Sub topics as a Trigger

4. Invite bot to a channel

5. Testing in cloud functions

complete!!

Authors / 著者

sakimyto

License / ライセンス

This is under MIT license .

Acknowledgments / 謝辞

References / 参考・引用文献

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages