Slack

v0.2.2 published on Friday, Aug 19, 2022 by Pulumi

The Slack provider for Pulumi can be used to provision resources available in Slack. The Slack provider must be configured with a token to manage resources in a Slack Workspace.

Example

import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";

// Create a new Slack channel
const channel = new slack.Conversation("acc-test", {
  topic: "my topic",
  isPrivate: false,
});

// Get the id of the new channel as an output
export const channelId = channel.id;
import pulumi_slack as slack

channel = slack.Conversation("test",
    topic: "test topic",
    isPrivate: false,
)
import (
	slack "github.com/pulumi/pulumi-slack/sdk/go/slack"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {

		channel, err := slack.Conversation(ctx, "test", &slack.ConversationArgs{
            Topic: pulumi.String("my topic"),
            IsPrivate: pulumi.Bool(false),
        })
		if err != nil {
			return err
		}

		ctx.Export("channel", channel.Name)

		return nil
	})
}
using Pulumi;
using Pulumi.Slack;

class SlackChannel : Channel
{
    public SlackChannel()
    {
        var channel = new Conversation("test", new ConversationArgs{
            topic = "my topic",
            isPrivate = false,
        });
    }
}