Conversation Args
Manages a Slack channel
Required scopes
This resource requires the following scopes: If using bot
tokens:
channels:read (public channels)
channels:manage (public channels)
channels:join (adopting existing public channels)
groups:read (private channels)
groups:write (private channels) If using
user
tokens:channels:read (public channels)
channels:write (public channels)
groups:read (private channels)
groups:write (private channels) The Slack API methods used by the resource are:
conversations.unarchive If you get
missing_scope
errors while using this resource check the scopes against the documentation for the methods above.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";
const test = new slack.Conversation("test", {
name: "my-channel",
topic: "The topic for my channel",
permanentMembers: [],
isPrivate: true,
});
import pulumi
import pulumi_slack as slack
test = slack.Conversation("test",
name="my-channel",
topic="The topic for my channel",
permanent_members=[],
is_private=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Slack = Pulumi.Slack;
return await Deployment.RunAsync(() =>
{
var test = new Slack.Conversation("test", new()
{
Name = "my-channel",
Topic = "The topic for my channel",
PermanentMembers = new[] {},
IsPrivate = true,
});
});
package main
import (
"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 {
_, err := slack.NewConversation(ctx, "test", &slack.ConversationArgs{
Name: pulumi.String("my-channel"),
Topic: pulumi.String("The topic for my channel"),
PermanentMembers: pulumi.StringArray{},
IsPrivate: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.slack.Conversation;
import com.pulumi.slack.ConversationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var test = new Conversation("test", ConversationArgs.builder()
.name("my-channel")
.topic("The topic for my channel")
.permanentMembers()
.isPrivate(true)
.build());
}
}
resources:
test:
type: slack:Conversation
properties:
name: my-channel
topic: The topic for my channel
permanentMembers: []
isPrivate: true
import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";
const nonadmin = new slack.Conversation("nonadmin", {
name: "my-channel01",
topic: "The channel won't be archived on destroy",
permanentMembers: [],
isPrivate: true,
actionOnDestroy: "none",
});
import pulumi
import pulumi_slack as slack
nonadmin = slack.Conversation("nonadmin",
name="my-channel01",
topic="The channel won't be archived on destroy",
permanent_members=[],
is_private=True,
action_on_destroy="none")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Slack = Pulumi.Slack;
return await Deployment.RunAsync(() =>
{
var nonadmin = new Slack.Conversation("nonadmin", new()
{
Name = "my-channel01",
Topic = "The channel won't be archived on destroy",
PermanentMembers = new[] {},
IsPrivate = true,
ActionOnDestroy = "none",
});
});
package main
import (
"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 {
_, err := slack.NewConversation(ctx, "nonadmin", &slack.ConversationArgs{
Name: pulumi.String("my-channel01"),
Topic: pulumi.String("The channel won't be archived on destroy"),
PermanentMembers: pulumi.StringArray{},
IsPrivate: pulumi.Bool(true),
ActionOnDestroy: pulumi.String("none"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.slack.Conversation;
import com.pulumi.slack.ConversationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var nonadmin = new Conversation("nonadmin", ConversationArgs.builder()
.name("my-channel01")
.topic("The channel won't be archived on destroy")
.permanentMembers()
.isPrivate(true)
.actionOnDestroy("none")
.build());
}
}
resources:
nonadmin:
type: slack:Conversation
properties:
name: my-channel01
topic: The channel won't be archived on destroy
permanentMembers: []
isPrivate: true
actionOnDestroy: none
import * as pulumi from "@pulumi/pulumi";
import * as slack from "@pulumi/slack";
const adopted = new slack.Conversation("adopted", {
name: "my-channel02",
topic: "Adopt existing, don't kick members",
permanentMembers: [],
adoptExistingChannel: true,
actionOnUpdatePermanentMembers: "none",
});
import pulumi
import pulumi_slack as slack
adopted = slack.Conversation("adopted",
name="my-channel02",
topic="Adopt existing, don't kick members",
permanent_members=[],
adopt_existing_channel=True,
action_on_update_permanent_members="none")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Slack = Pulumi.Slack;
return await Deployment.RunAsync(() =>
{
var adopted = new Slack.Conversation("adopted", new()
{
Name = "my-channel02",
Topic = "Adopt existing, don't kick members",
PermanentMembers = new[] {},
AdoptExistingChannel = true,
ActionOnUpdatePermanentMembers = "none",
});
});
package main
import (
"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 {
_, err := slack.NewConversation(ctx, "adopted", &slack.ConversationArgs{
Name: pulumi.String("my-channel02"),
Topic: pulumi.String("Adopt existing, don't kick members"),
PermanentMembers: pulumi.StringArray{},
AdoptExistingChannel: pulumi.Bool(true),
ActionOnUpdatePermanentMembers: pulumi.String("none"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.slack.Conversation;
import com.pulumi.slack.ConversationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var adopted = new Conversation("adopted", ConversationArgs.builder()
.name("my-channel02")
.topic("Adopt existing, don't kick members")
.permanentMembers()
.adoptExistingChannel(true)
.actionOnUpdatePermanentMembers("none")
.build());
}
}
resources:
adopted:
type: slack:Conversation
properties:
name: my-channel02
topic: Adopt existing, don't kick members
permanentMembers: []
adoptExistingChannel: true
actionOnUpdatePermanentMembers: none
Import
slack_conversation
can be imported using the ID of the conversation/channel, e.g.
$ pulumi import slack:index/conversation:Conversation my_conversation C023X7QTFHQ
Constructors
Properties
indicates whether the conversation should be archived or left behind on destroy. Valid values are archive | none
. Note that when set to none
the conversation will be left as it is and as a result any subsequent runs of pulumi up with the same name will fail.
indicate whether the members should be kick of the channel when removed from permanent_members
. When set to none
the user are never kicked, this prevent a side effect on public channels where user that joined the channel are kicked.
indicates a conversation is archived. Frozen in time.
user IDs to add to the channel.