An open API service indexing awesome lists of open source software.

https://github.com/deas/gcsh-to-ms-teams

Google Cloud Service Health to MS Teams
https://github.com/deas/gcsh-to-ms-teams

Last synced: 2 months ago
JSON representation

Google Cloud Service Health to MS Teams

Awesome Lists containing this project

README

        

# Google Cloud Service Health to MS Teams - GCP Cloud Function

Pull [Google Cloud Service Health](https://status.cloud.google.com), filter `most_recent_update` by `location`, `service_name`, `status` and `created` and send it to MS Teams.

For the time beeing, this function does not persist anything. It relies on `age` passed in with the filter. I am aware this might miss events in certain edge cases.
## Configuration
The function gets the configuration with the call. A [sample payload](src/test/flt-config.edn) is provided.

### Deployment (terraform)
This terraform module is very minimalistic - it only provides bare output.

| Name | Description |
|------|-------------|
| [entry\_point](#output\_entry\_point) | The function entry point |
| [path](#output\_path) | The path to the function build artifacts |
| [runtime](#output\_runtime) | The runtime |

There is a [basic example](examples/basic) provided.

### Development
Requirements
- Java (for build, Runtime not quite yet)
- Node JS

Install dependencies
```shell
yarn install || npm install
```

REPL (with Calva):

Start your project with a REPL and connect -> `shadow-cljs` -> `:node` -> `:node`.

Or in a plain shell:
```shell
yarn run repl || npm run repl
```
Run dev process
```shell
yarn start || npm start
```
Now you should be able to evaluate forms from the REPL.

Test
```shell
yarn run test || npm run test
```

Build and run locally:
```shell
yarn run build || npm run build
yarn run serve || npm run serve
```
Send PubSub Payload (including CloudEvent headers) to local service
```shell
message=src/test/flt-config.edn
endpoint=http://localhost:8080/a_topic_name

cat <