Service Slack
The gitlab.ServiceSlack
resource allows to manage the lifecycle of a project integration with Slack. Upstream API: GitLab REST API docs
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.Project;
import com.pulumi.gitlab.ProjectArgs;
import com.pulumi.gitlab.ServiceSlack;
import com.pulumi.gitlab.ServiceSlackArgs;
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 awesomeProject = new Project("awesomeProject", ProjectArgs.builder()
.description("My awesome project.")
.visibilityLevel("public")
.build());
var slack = new ServiceSlack("slack", ServiceSlackArgs.builder()
.project(awesomeProject.id())
.webhook("https://webhook.com")
.username("myuser")
.pushEvents(true)
.pushChannel("push_chan")
.build());
}
}
Import
You can import a gitlab_service_slack.slack state using the project ID, e.g.
$ pulumi import gitlab:index/serviceSlack:ServiceSlack email 1
Properties
Branches to send notifications for. Valid options are "all", "default", "protected", and "defaultandprotected".
The name of the channel to receive confidential issue events notifications.
Enable notifications for confidential issues events.
Enable notifications for confidential note events.
The name of the channel to receive issue events notifications.
Enable notifications for issues events.
The name of the channel to receive merge request events notifications.
Enable notifications for merge requests events.
The name of the channel to receive note events notifications.
Enable notifications for note events.
Send notifications for broken pipelines.
This parameter has been replaced with branches_to_be_notified
.
The name of the channel to receive pipeline events notifications.
Enable notifications for pipeline events.
The name of the channel to receive push events notifications.
Enable notifications for push events.
The name of the channel to receive tag push events notifications.
Enable notifications for tag push events.
The name of the channel to receive wiki page events notifications.
Enable notifications for wiki page events.