You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to use Slack to send notifications to your Slack channel whenever an apply is being done.
4
+
5
+
::: tip NOTE
6
+
Currently only `apply` events are supported.
7
+
:::
8
+
9
+
For this you'll need to:
10
+
11
+
* Create a Bot user in Slack
12
+
* Configure Atlantis to send notifications to Slack.
13
+
14
+
## Configuring Slack for Atlantis
15
+
16
+
* Go to [https://api.slack.com/apps](https://api.slack.com/apps)
17
+
* Click the `Create New App` button
18
+
* Select `From scratch` in the dialog that opens
19
+
* Give it a name, e.g. `atlantis-bot`.
20
+
* Select your Slack workspace
21
+
* Click `Create App`
22
+
* On the left go to `oAuth & Permissions`
23
+
* Copy the `Bot User OAuth Token` and provide it to Atlantis by using `--slack-token=xoxb-xxxxxxxxxxx` or via the environment `ATLANTIS_SLACK_TOKEN=xoxb-xxxxxxxxxxx`.
24
+
* Scroll down to scopes and add the following:
25
+
*`channels:read`
26
+
*`chat:write`
27
+
*`groups:read`
28
+
*`incoming-webhook`
29
+
*`mpim:read`
30
+
* Install the app onto your Slack workspace
31
+
32
+
## Configuring Atlantis
33
+
34
+
After following the above steps it is time to configure Atlantis. Assuming you have already provided the `slack-token` (via parameter or environment variable) you can now instruct Atlantis to send `apply` events to Slack.
35
+
36
+
In your Atlantis configuration you can now add the following:
37
+
38
+
```yaml
39
+
webhooks:
40
+
- event: apply
41
+
workspace-regex: .*
42
+
kind: slack
43
+
channel: my-channel
44
+
```
45
+
46
+
The `apply` event information will be sent to the `my-channel` Slack channel.
0 commit comments