gitlab.ProjectMergeRequestNote
Explore with Pulumi AI
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.
- Merge
Request intIid - 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.
- Created
At 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.
- Merge
Request stringDiff Head Sha - The diff head SHA of the merge request when the note was created.
- Body string
- The body of the merge request note.
- Merge
Request intIid - 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.
- Created
At 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.
- Merge
Request stringDiff Head Sha - The diff head SHA of the merge request when the note was created.
- body String
- The body of the merge request note.
- merge
Request IntegerIid - 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.
- created
At 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.
- merge
Request StringDiff Head Sha - The diff head SHA of the merge request when the note was created.
- body string
- The body of the merge request note.
- merge
Request numberIid - 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.
- created
At 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.
- merge
Request stringDiff Head Sha - The diff head SHA of the merge request when the note was created.
- body str
- The body of the merge request note.
- merge_
request_ intiid - 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_ strdiff_ head_ sha - The diff head SHA of the merge request when the note was created.
- body String
- The body of the merge request note.
- merge
Request NumberIid - 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.
- created
At 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.
- merge
Request StringDiff Head Sha - 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.
- 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 string - The last updated date of the merge request note.
- Id string
- 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 string - The last updated date of the merge request note.
- id String
- The provider-assigned unique ID for this managed resource.
- note
Id 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.
- updated
At String - The last updated date of the merge request note.
- id string
- The provider-assigned unique ID for this managed resource.
- note
Id 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.
- updated
At 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.
- note
Id 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.
- updated
At 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.
- Body string
- The body of the merge request note.
- Created
At 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.
- Merge
Request stringDiff Head Sha - The diff head SHA of the merge request when the note was created.
- Merge
Request intIid - The IID of the merge request to add the note to.
- Note
Id 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.
- Updated
At string - The last updated date of the merge request note.
- Body string
- The body of the merge request note.
- Created
At 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.
- Merge
Request stringDiff Head Sha - The diff head SHA of the merge request when the note was created.
- Merge
Request intIid - The IID of the merge request to add the note to.
- Note
Id 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.
- Updated
At string - The last updated date of the merge request note.
- body String
- The body of the merge request note.
- created
At 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.
- merge
Request StringDiff Head Sha - The diff head SHA of the merge request when the note was created.
- merge
Request IntegerIid - The IID of the merge request to add the note to.
- note
Id 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.
- updated
At String - The last updated date of the merge request note.
- body string
- The body of the merge request note.
- created
At 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.
- merge
Request stringDiff Head Sha - The diff head SHA of the merge request when the note was created.
- merge
Request numberIid - The IID of the merge request to add the note to.
- note
Id 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.
- updated
At 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_ strdiff_ head_ sha - The diff head SHA of the merge request when the note was created.
- merge_
request_ intiid - 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.
- created
At 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.
- merge
Request StringDiff Head Sha - The diff head SHA of the merge request when the note was created.
- merge
Request NumberIid - The IID of the merge request to add the note to.
- note
Id 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.
- updated
At 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.