1. Packages
  2. Gitlab Provider
  3. API Docs
  4. ProjectMergeRequestNote
GitLab v9.2.0 published on Friday, Jul 18, 2025 by Pulumi

gitlab.ProjectMergeRequestNote

Explore with Pulumi AI

gitlab logo
GitLab v9.2.0 published on Friday, Jul 18, 2025 by Pulumi

    The gitlab.ProjectMergeRequestNote resource manages the lifecycle of a project merge request note.

    Upstream API: GitLab REST API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const example = new gitlab.Project("example", {
        name: "example project",
        description: "Lorem Ipsum",
        visibilityLevel: "public",
    });
    const exampleProjectMergeRequestNote = new gitlab.ProjectMergeRequestNote("example", {
        project: example.id,
        mergeRequestIid: 456,
        body: "Example note",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    example = gitlab.Project("example",
        name="example project",
        description="Lorem Ipsum",
        visibility_level="public")
    example_project_merge_request_note = gitlab.ProjectMergeRequestNote("example",
        project=example.id,
        merge_request_iid=456,
        body="Example note")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gitlab/sdk/v9/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := gitlab.NewProject(ctx, "example", &gitlab.ProjectArgs{
    			Name:            pulumi.String("example project"),
    			Description:     pulumi.String("Lorem Ipsum"),
    			VisibilityLevel: pulumi.String("public"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = gitlab.NewProjectMergeRequestNote(ctx, "example", &gitlab.ProjectMergeRequestNoteArgs{
    			Project:         example.ID(),
    			MergeRequestIid: pulumi.Int(456),
    			Body:            pulumi.String("Example note"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using GitLab = Pulumi.GitLab;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new GitLab.Project("example", new()
        {
            Name = "example project",
            Description = "Lorem Ipsum",
            VisibilityLevel = "public",
        });
    
        var exampleProjectMergeRequestNote = new GitLab.ProjectMergeRequestNote("example", new()
        {
            Project = example.Id,
            MergeRequestIid = 456,
            Body = "Example note",
        });
    
    });
    
    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.ProjectMergeRequestNote;
    import com.pulumi.gitlab.ProjectMergeRequestNoteArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("example project")
                .description("Lorem Ipsum")
                .visibilityLevel("public")
                .build());
    
            var exampleProjectMergeRequestNote = new ProjectMergeRequestNote("exampleProjectMergeRequestNote", ProjectMergeRequestNoteArgs.builder()
                .project(example.id())
                .mergeRequestIid(456)
                .body("Example note")
                .build());
    
        }
    }
    
    resources:
      example:
        type: gitlab:Project
        properties:
          name: example project
          description: Lorem Ipsum
          visibilityLevel: public
      exampleProjectMergeRequestNote:
        type: gitlab:ProjectMergeRequestNote
        name: example
        properties:
          project: ${example.id}
          mergeRequestIid: 456
          body: Example note
    

    Create ProjectMergeRequestNote Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ProjectMergeRequestNote(name: string, args: ProjectMergeRequestNoteArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectMergeRequestNote(resource_name: str,
                                args: ProjectMergeRequestNoteArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectMergeRequestNote(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                body: Optional[str] = None,
                                merge_request_iid: Optional[int] = None,
                                project: Optional[str] = None,
                                created_at: Optional[str] = None,
                                internal: Optional[bool] = None,
                                merge_request_diff_head_sha: Optional[str] = None)
    func NewProjectMergeRequestNote(ctx *Context, name string, args ProjectMergeRequestNoteArgs, opts ...ResourceOption) (*ProjectMergeRequestNote, error)
    public ProjectMergeRequestNote(string name, ProjectMergeRequestNoteArgs args, CustomResourceOptions? opts = null)
    public ProjectMergeRequestNote(String name, ProjectMergeRequestNoteArgs args)
    public ProjectMergeRequestNote(String name, ProjectMergeRequestNoteArgs args, CustomResourceOptions options)
    
    type: gitlab:ProjectMergeRequestNote
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ProjectMergeRequestNoteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ProjectMergeRequestNoteArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ProjectMergeRequestNoteArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectMergeRequestNoteArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectMergeRequestNoteArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var projectMergeRequestNoteResource = new GitLab.ProjectMergeRequestNote("projectMergeRequestNoteResource", new()
    {
        Body = "string",
        MergeRequestIid = 0,
        Project = "string",
        CreatedAt = "string",
        Internal = false,
        MergeRequestDiffHeadSha = "string",
    });
    
    example, err := gitlab.NewProjectMergeRequestNote(ctx, "projectMergeRequestNoteResource", &gitlab.ProjectMergeRequestNoteArgs{
    	Body:                    pulumi.String("string"),
    	MergeRequestIid:         pulumi.Int(0),
    	Project:                 pulumi.String("string"),
    	CreatedAt:               pulumi.String("string"),
    	Internal:                pulumi.Bool(false),
    	MergeRequestDiffHeadSha: pulumi.String("string"),
    })
    
    var projectMergeRequestNoteResource = new ProjectMergeRequestNote("projectMergeRequestNoteResource", ProjectMergeRequestNoteArgs.builder()
        .body("string")
        .mergeRequestIid(0)
        .project("string")
        .createdAt("string")
        .internal(false)
        .mergeRequestDiffHeadSha("string")
        .build());
    
    project_merge_request_note_resource = gitlab.ProjectMergeRequestNote("projectMergeRequestNoteResource",
        body="string",
        merge_request_iid=0,
        project="string",
        created_at="string",
        internal=False,
        merge_request_diff_head_sha="string")
    
    const projectMergeRequestNoteResource = new gitlab.ProjectMergeRequestNote("projectMergeRequestNoteResource", {
        body: "string",
        mergeRequestIid: 0,
        project: "string",
        createdAt: "string",
        internal: false,
        mergeRequestDiffHeadSha: "string",
    });
    
    type: gitlab:ProjectMergeRequestNote
    properties:
        body: string
        createdAt: string
        internal: false
        mergeRequestDiffHeadSha: string
        mergeRequestIid: 0
        project: string
    

    ProjectMergeRequestNote Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ProjectMergeRequestNote resource accepts the following input properties:

    Body string
    The body of the merge request note.
    MergeRequestIid int
    The IID of the merge request to add the note to.
    Project string
    The ID or path of the project to add the note to.
    CreatedAt string
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    Internal bool
    Indicates if the merge request note is internal.
    MergeRequestDiffHeadSha string
    The diff head SHA of the merge request when the note was created.
    Body string
    The body of the merge request note.
    MergeRequestIid int
    The IID of the merge request to add the note to.
    Project string
    The ID or path of the project to add the note to.
    CreatedAt string
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    Internal bool
    Indicates if the merge request note is internal.
    MergeRequestDiffHeadSha string
    The diff head SHA of the merge request when the note was created.
    body String
    The body of the merge request note.
    mergeRequestIid Integer
    The IID of the merge request to add the note to.
    project String
    The ID or path of the project to add the note to.
    createdAt String
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    internal Boolean
    Indicates if the merge request note is internal.
    mergeRequestDiffHeadSha String
    The diff head SHA of the merge request when the note was created.
    body string
    The body of the merge request note.
    mergeRequestIid number
    The IID of the merge request to add the note to.
    project string
    The ID or path of the project to add the note to.
    createdAt string
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    internal boolean
    Indicates if the merge request note is internal.
    mergeRequestDiffHeadSha string
    The diff head SHA of the merge request when the note was created.
    body str
    The body of the merge request note.
    merge_request_iid int
    The IID of the merge request to add the note to.
    project str
    The ID or path of the project to add the note to.
    created_at str
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    internal bool
    Indicates if the merge request note is internal.
    merge_request_diff_head_sha str
    The diff head SHA of the merge request when the note was created.
    body String
    The body of the merge request note.
    mergeRequestIid Number
    The IID of the merge request to add the note to.
    project String
    The ID or path of the project to add the note to.
    createdAt String
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    internal Boolean
    Indicates if the merge request note is internal.
    mergeRequestDiffHeadSha String
    The diff head SHA of the merge request when the note was created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ProjectMergeRequestNote resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    NoteId int
    The ID of the merge request note.
    Resolvable bool
    Indicates if the merge request note is resolvable.
    System bool
    Indicates if the merge request note is a system note.
    UpdatedAt string
    The last updated date of the merge request note.
    Id string
    The provider-assigned unique ID for this managed resource.
    NoteId int
    The ID of the merge request note.
    Resolvable bool
    Indicates if the merge request note is resolvable.
    System bool
    Indicates if the merge request note is a system note.
    UpdatedAt string
    The last updated date of the merge request note.
    id String
    The provider-assigned unique ID for this managed resource.
    noteId Integer
    The ID of the merge request note.
    resolvable Boolean
    Indicates if the merge request note is resolvable.
    system Boolean
    Indicates if the merge request note is a system note.
    updatedAt String
    The last updated date of the merge request note.
    id string
    The provider-assigned unique ID for this managed resource.
    noteId number
    The ID of the merge request note.
    resolvable boolean
    Indicates if the merge request note is resolvable.
    system boolean
    Indicates if the merge request note is a system note.
    updatedAt string
    The last updated date of the merge request note.
    id str
    The provider-assigned unique ID for this managed resource.
    note_id int
    The ID of the merge request note.
    resolvable bool
    Indicates if the merge request note is resolvable.
    system bool
    Indicates if the merge request note is a system note.
    updated_at str
    The last updated date of the merge request note.
    id String
    The provider-assigned unique ID for this managed resource.
    noteId Number
    The ID of the merge request note.
    resolvable Boolean
    Indicates if the merge request note is resolvable.
    system Boolean
    Indicates if the merge request note is a system note.
    updatedAt String
    The last updated date of the merge request note.

    Look up Existing ProjectMergeRequestNote Resource

    Get an existing ProjectMergeRequestNote resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ProjectMergeRequestNoteState, opts?: CustomResourceOptions): ProjectMergeRequestNote
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            body: Optional[str] = None,
            created_at: Optional[str] = None,
            internal: Optional[bool] = None,
            merge_request_diff_head_sha: Optional[str] = None,
            merge_request_iid: Optional[int] = None,
            note_id: Optional[int] = None,
            project: Optional[str] = None,
            resolvable: Optional[bool] = None,
            system: Optional[bool] = None,
            updated_at: Optional[str] = None) -> ProjectMergeRequestNote
    func GetProjectMergeRequestNote(ctx *Context, name string, id IDInput, state *ProjectMergeRequestNoteState, opts ...ResourceOption) (*ProjectMergeRequestNote, error)
    public static ProjectMergeRequestNote Get(string name, Input<string> id, ProjectMergeRequestNoteState? state, CustomResourceOptions? opts = null)
    public static ProjectMergeRequestNote get(String name, Output<String> id, ProjectMergeRequestNoteState state, CustomResourceOptions options)
    resources:  _:    type: gitlab:ProjectMergeRequestNote    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Body string
    The body of the merge request note.
    CreatedAt string
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    Internal bool
    Indicates if the merge request note is internal.
    MergeRequestDiffHeadSha string
    The diff head SHA of the merge request when the note was created.
    MergeRequestIid int
    The IID of the merge request to add the note to.
    NoteId int
    The ID of the merge request note.
    Project string
    The ID or path of the project to add the note to.
    Resolvable bool
    Indicates if the merge request note is resolvable.
    System bool
    Indicates if the merge request note is a system note.
    UpdatedAt string
    The last updated date of the merge request note.
    Body string
    The body of the merge request note.
    CreatedAt string
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    Internal bool
    Indicates if the merge request note is internal.
    MergeRequestDiffHeadSha string
    The diff head SHA of the merge request when the note was created.
    MergeRequestIid int
    The IID of the merge request to add the note to.
    NoteId int
    The ID of the merge request note.
    Project string
    The ID or path of the project to add the note to.
    Resolvable bool
    Indicates if the merge request note is resolvable.
    System bool
    Indicates if the merge request note is a system note.
    UpdatedAt string
    The last updated date of the merge request note.
    body String
    The body of the merge request note.
    createdAt String
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    internal Boolean
    Indicates if the merge request note is internal.
    mergeRequestDiffHeadSha String
    The diff head SHA of the merge request when the note was created.
    mergeRequestIid Integer
    The IID of the merge request to add the note to.
    noteId Integer
    The ID of the merge request note.
    project String
    The ID or path of the project to add the note to.
    resolvable Boolean
    Indicates if the merge request note is resolvable.
    system Boolean
    Indicates if the merge request note is a system note.
    updatedAt String
    The last updated date of the merge request note.
    body string
    The body of the merge request note.
    createdAt string
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    internal boolean
    Indicates if the merge request note is internal.
    mergeRequestDiffHeadSha string
    The diff head SHA of the merge request when the note was created.
    mergeRequestIid number
    The IID of the merge request to add the note to.
    noteId number
    The ID of the merge request note.
    project string
    The ID or path of the project to add the note to.
    resolvable boolean
    Indicates if the merge request note is resolvable.
    system boolean
    Indicates if the merge request note is a system note.
    updatedAt string
    The last updated date of the merge request note.
    body str
    The body of the merge request note.
    created_at str
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    internal bool
    Indicates if the merge request note is internal.
    merge_request_diff_head_sha str
    The diff head SHA of the merge request when the note was created.
    merge_request_iid int
    The IID of the merge request to add the note to.
    note_id int
    The ID of the merge request note.
    project str
    The ID or path of the project to add the note to.
    resolvable bool
    Indicates if the merge request note is resolvable.
    system bool
    Indicates if the merge request note is a system note.
    updated_at str
    The last updated date of the merge request note.
    body String
    The body of the merge request note.
    createdAt String
    The creation date of the merge request note. Using this field requires the token used with the provider to either be an Admin, or hava a Project or Group Owner role.
    internal Boolean
    Indicates if the merge request note is internal.
    mergeRequestDiffHeadSha String
    The diff head SHA of the merge request when the note was created.
    mergeRequestIid Number
    The IID of the merge request to add the note to.
    noteId Number
    The ID of the merge request note.
    project String
    The ID or path of the project to add the note to.
    resolvable Boolean
    Indicates if the merge request note is resolvable.
    system Boolean
    Indicates if the merge request note is a system note.
    updatedAt String
    The last updated date of the merge request note.

    Import

    Starting in Terraform v1.5.0, you can use an import block to import gitlab_project_merge_request_note. For example:

    terraform

    import {

    to = gitlab_project_merge_request_note.example

    id = “see CLI command below for ID”

    }

    Importing using the CLI is supported with the following syntax:

    A GitLab Project Merge Request Note can be imported using a key composed of <project-id>:<merge-request-iid>:<note-id>, for example:

    $ pulumi import gitlab:index/projectMergeRequestNote:ProjectMergeRequestNote example "12345:1:3"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v9.2.0 published on Friday, Jul 18, 2025 by Pulumi