- Channels: can create public, private, add description, purpose, etc...
- User: bind existenting user to a channel
A channel cannot be deleted, this provider rename and archive the channel.
We need to configure some scopes to manage resources (Bot tokens):
- Open https://api.slack.com/apps
- Create new App
- Configure App Name and Workspace to develop
- Use the manifest below
_metadata:
major_version: 1
minor_version: 1
display_information:
name: pulumi-resource-slack
features:
bot_user:
display_name: pulumi-resource-slack
always_online: false
oauth_config:
scopes:
bot:
- channels:manage
- groups:write
- im:write
- mpim:write
- groups:read
- channels:read
- im:read
- mpim:read
- users:read
- users:read.email
settings:
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false
- Open menu Oauth & Permissions
- Click on Install to Workspace and allow requested permissions
- Go to menu Features/Oauth & Permissions
- Copy the bot user oauth token to be used by this provider
If you are facing problems to manage channel members, even if you add permission scopes to the bot user, check the channel management.
https://YOUR-WORKSPACE-HERE.slack.com/admin/settings#channel_management_restrictions
You need to set Slack token with:
export SLACK_TOKEN xoxb-2271973586641-3369578963123-hngThgT5dq4W7vmHdzd91T3H
or
pulumi config set --secret slack:config:token xoxb-2271973586641-3369578963123-hngThgT5dq4W7vmHdzd91T3H
You can download the latest provider from releases and install with:
pulumi plugin install resource slack 0.0.5 -f /tmp/pulumi-resource-slack-v0.0.5-alpha.1636395768+d62d844a-linux-amd64.tar.gz
Install the pulumictl
cli from the releases page or follow the install instructions
NB: Usage of
pulumictl
is optional. If not using it, hard code the version in the Makefile of when building explicitly pass version asVERSION=0.0.1 make build
# build and install the resource provider plugin
$ make build install
# test
$ cd examples/ts
$ yarn link @pulumi/slack
$ yarn install
$ pulumi stack init test
$ pulumi up