Microsoft Teams
Microsoft Teams is the central meeting place for many organizations and DevOps teams for code reviews, incident notifications, and more. The Scalr Teams integration enables you to be more efficient and move at a faster pace, and at Scalr, we believe in meeting our users where they work. The integration for Teams will send notifications based on run events. The integration can be added through Microsoft AppSource.
Setup
After adding the Scalr app to your team from the Teams Store, start by linking your Teams user to an authenticated user in Scalr by issuing the @scalr connect
command. This is required to manage the channel's notification subscriptions.
The following commands can be used in Microsoft Teams to configure the integration:
Command | Description |
---|---|
@scalr connect | Connect your Teams user to the Scalr user |
@scalr disconnect | Remove the association with the Scalr account |
@scalr subscribe events[, ...] environments[, ...] workspaces[, ...] | Subscribe current channel to select events. 'environments' and 'workspaces' arguments define the Scalr environments and workspaces which the events will stream from |
@scalr unsubscribe | Remove the channel's subscription |
@scalr help | Display this help message |
At least one event and one environment must be supplied to the subscribe command. Adding the environment means that the channel will receive notifications for all the runs from that environment. Workspaces can be specified to narrow down notifications to only runs in the given workspaces (the workspaces must belong to the environments supplied in the environments block).
The integrations:manage
permission is needed in Scalr to execute the @scalr subscribe
command as it creates a new Teams connection.
Events
Possible events are:
Event | Description |
---|---|
run_approval_required | The run is waiting for a user to approve it |
run_success | Any type of run has finished successfully (this includes canceled/discarded runs) |
dry_run_success | The dry run (plan-only) has finished successfully |
run_errored | Any type of run failed |
apply_success | The apply run finished successfully |
apply_errored | The apply run errored |
dry_run_errored | The dry run (plan-only) has failed |
Examples
Receive notifications only for the run_approval_required
and run_errored
events from the workspaces ws-xxx
, ws-yyy
in the env-xxx
environment:
@scalr subscribe events[run_approval_required, run_errored] environments[env-xxx] workspaces[ws-xxx, ws-yyy]
Receive notifications for all possible run outcomes from the entire env-xxx
environment:
@scalr subscribe events[run_approval_required, run_errored, dry_run_errored, run_success, dry_run_success] environments[env-xxx]
Notifications and Approvals
When the Teams notification is received there will be an option to "Review run", which gives you the option to approve or decline it:
The first time a user goes through this workflow Scalr will authorize the bot for Teams. Once authorized, the bot will check that the person taking action on the run has the proper permission in Scalr to do so each time an action button is clicked. Once an action is taken, an optional reason can be given for the approve/deny and it will then appear in the run information in Scalr.
Updated 4 months ago