Integration Telegram
The gitlab.IntegrationTelegram
resource allows to manage the lifecycle of a project integration with Telegram. Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const awesomeProject = new gitlab.Project("awesome_project", {
name: "awesome_project",
description: "My awesome project.",
visibilityLevel: "public",
});
const _default = new gitlab.IntegrationTelegram("default", {
token: "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
room: "-1000000000000000",
notifyOnlyBrokenPipelines: false,
branchesToBeNotified: "all",
pushEvents: false,
issuesEvents: false,
confidentialIssuesEvents: false,
mergeRequestsEvents: false,
tagPushEvents: false,
noteEvents: false,
confidentialNoteEvents: false,
pipelineEvents: false,
wikiPageEvents: false,
});
import pulumi
import pulumi_gitlab as gitlab
awesome_project = gitlab.Project("awesome_project",
name="awesome_project",
description="My awesome project.",
visibility_level="public")
default = gitlab.IntegrationTelegram("default",
token="123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
room="-1000000000000000",
notify_only_broken_pipelines=False,
branches_to_be_notified="all",
push_events=False,
issues_events=False,
confidential_issues_events=False,
merge_requests_events=False,
tag_push_events=False,
note_events=False,
confidential_note_events=False,
pipeline_events=False,
wiki_page_events=False)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var awesomeProject = new GitLab.Project("awesome_project", new()
{
Name = "awesome_project",
Description = "My awesome project.",
VisibilityLevel = "public",
});
var @default = new GitLab.IntegrationTelegram("default", new()
{
Token = "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
Room = "-1000000000000000",
NotifyOnlyBrokenPipelines = false,
BranchesToBeNotified = "all",
PushEvents = false,
IssuesEvents = false,
ConfidentialIssuesEvents = false,
MergeRequestsEvents = false,
TagPushEvents = false,
NoteEvents = false,
ConfidentialNoteEvents = false,
PipelineEvents = false,
WikiPageEvents = false,
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewProject(ctx, "awesome_project", &gitlab.ProjectArgs{
Name: pulumi.String("awesome_project"),
Description: pulumi.String("My awesome project."),
VisibilityLevel: pulumi.String("public"),
})
if err != nil {
return err
}
_, err = gitlab.NewIntegrationTelegram(ctx, "default", &gitlab.IntegrationTelegramArgs{
Token: pulumi.String("123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"),
Room: pulumi.String("-1000000000000000"),
NotifyOnlyBrokenPipelines: pulumi.Bool(false),
BranchesToBeNotified: pulumi.String("all"),
PushEvents: pulumi.Bool(false),
IssuesEvents: pulumi.Bool(false),
ConfidentialIssuesEvents: pulumi.Bool(false),
MergeRequestsEvents: pulumi.Bool(false),
TagPushEvents: pulumi.Bool(false),
NoteEvents: pulumi.Bool(false),
ConfidentialNoteEvents: pulumi.Bool(false),
PipelineEvents: pulumi.Bool(false),
WikiPageEvents: pulumi.Bool(false),
})
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.gitlab.Project;
import com.pulumi.gitlab.ProjectArgs;
import com.pulumi.gitlab.IntegrationTelegram;
import com.pulumi.gitlab.IntegrationTelegramArgs;
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()
.name("awesome_project")
.description("My awesome project.")
.visibilityLevel("public")
.build());
var default_ = new IntegrationTelegram("default", IntegrationTelegramArgs.builder()
.token("123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11")
.room("-1000000000000000")
.notifyOnlyBrokenPipelines(false)
.branchesToBeNotified("all")
.pushEvents(false)
.issuesEvents(false)
.confidentialIssuesEvents(false)
.mergeRequestsEvents(false)
.tagPushEvents(false)
.noteEvents(false)
.confidentialNoteEvents(false)
.pipelineEvents(false)
.wikiPageEvents(false)
.build());
}
}
resources:
awesomeProject:
type: gitlab:Project
name: awesome_project
properties:
name: awesome_project
description: My awesome project.
visibilityLevel: public
default:
type: gitlab:IntegrationTelegram
properties:
token: 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
room: '-1000000000000000'
notifyOnlyBrokenPipelines: false
branchesToBeNotified: all
pushEvents: false
issuesEvents: false
confidentialIssuesEvents: false
mergeRequestsEvents: false
tagPushEvents: false
noteEvents: false
confidentialNoteEvents: false
pipelineEvents: false
wikiPageEvents: false
Import
Starting in Terraform v1.5.0 you can use an import block to import gitlab_integration_telegram
. For example: terraform import { to = gitlab_integration_telegram.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax: You can import a gitlab_integration_telegram state using the project ID, e.g.
$ pulumi import gitlab:index/integrationTelegram:IntegrationTelegram default 1
Properties
Branches to send notifications for. Valid options are all
, default
, protected
, default_and_protected
.
Enable notifications for confidential issues events.
Enable notifications for confidential note events.
Enable notifications for issues events.
Enable notifications for merge requests events.
Enable notifications for note events.
Send notifications for broken pipelines.
Enable notifications for pipeline events.
Enable notifications for push events.
Enable notifications for tag push events.
Enable notifications for wiki page events.