1. Packages
  2. GitLab
  3. API Docs
  4. ProjectApprovalRule
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

gitlab.ProjectApprovalRule

Explore with Pulumi AI

gitlab logo
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

    Example Usage

    Create ProjectApprovalRule Resource

    new ProjectApprovalRule(name: string, args: ProjectApprovalRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectApprovalRule(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            applies_to_all_protected_branches: Optional[bool] = None,
                            approvals_required: Optional[int] = None,
                            disable_importing_default_any_approver_rule_on_create: Optional[bool] = None,
                            group_ids: Optional[Sequence[int]] = None,
                            name: Optional[str] = None,
                            project: Optional[str] = None,
                            protected_branch_ids: Optional[Sequence[int]] = None,
                            rule_type: Optional[str] = None,
                            user_ids: Optional[Sequence[int]] = None)
    @overload
    def ProjectApprovalRule(resource_name: str,
                            args: ProjectApprovalRuleArgs,
                            opts: Optional[ResourceOptions] = None)
    func NewProjectApprovalRule(ctx *Context, name string, args ProjectApprovalRuleArgs, opts ...ResourceOption) (*ProjectApprovalRule, error)
    public ProjectApprovalRule(string name, ProjectApprovalRuleArgs args, CustomResourceOptions? opts = null)
    public ProjectApprovalRule(String name, ProjectApprovalRuleArgs args)
    public ProjectApprovalRule(String name, ProjectApprovalRuleArgs args, CustomResourceOptions options)
    
    type: gitlab:ProjectApprovalRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ProjectApprovalRuleArgs
    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 ProjectApprovalRuleArgs
    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 ProjectApprovalRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectApprovalRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectApprovalRuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ProjectApprovalRule Resource Properties

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

    Inputs

    The ProjectApprovalRule resource accepts the following input properties:

    ApprovalsRequired int
    The number of approvals required for this rule.
    Project string
    The name or id of the project to add the approval rules.
    AppliesToAllProtectedBranches bool
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    DisableImportingDefaultAnyApproverRuleOnCreate bool
    When this flag is set, the default any_approver rule will not be imported if present.
    GroupIds List<int>
    A list of group IDs whose members can approve of the merge request.
    Name string
    The name of the approval rule.
    ProtectedBranchIds List<int>
    A list of protected branch IDs (not branch names) for which the rule applies.
    RuleType string
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    UserIds List<int>
    A list of specific User IDs to add to the list of approvers.
    ApprovalsRequired int
    The number of approvals required for this rule.
    Project string
    The name or id of the project to add the approval rules.
    AppliesToAllProtectedBranches bool
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    DisableImportingDefaultAnyApproverRuleOnCreate bool
    When this flag is set, the default any_approver rule will not be imported if present.
    GroupIds []int
    A list of group IDs whose members can approve of the merge request.
    Name string
    The name of the approval rule.
    ProtectedBranchIds []int
    A list of protected branch IDs (not branch names) for which the rule applies.
    RuleType string
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    UserIds []int
    A list of specific User IDs to add to the list of approvers.
    approvalsRequired Integer
    The number of approvals required for this rule.
    project String
    The name or id of the project to add the approval rules.
    appliesToAllProtectedBranches Boolean
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    disableImportingDefaultAnyApproverRuleOnCreate Boolean
    When this flag is set, the default any_approver rule will not be imported if present.
    groupIds List<Integer>
    A list of group IDs whose members can approve of the merge request.
    name String
    The name of the approval rule.
    protectedBranchIds List<Integer>
    A list of protected branch IDs (not branch names) for which the rule applies.
    ruleType String
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    userIds List<Integer>
    A list of specific User IDs to add to the list of approvers.
    approvalsRequired number
    The number of approvals required for this rule.
    project string
    The name or id of the project to add the approval rules.
    appliesToAllProtectedBranches boolean
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    disableImportingDefaultAnyApproverRuleOnCreate boolean
    When this flag is set, the default any_approver rule will not be imported if present.
    groupIds number[]
    A list of group IDs whose members can approve of the merge request.
    name string
    The name of the approval rule.
    protectedBranchIds number[]
    A list of protected branch IDs (not branch names) for which the rule applies.
    ruleType string
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    userIds number[]
    A list of specific User IDs to add to the list of approvers.
    approvals_required int
    The number of approvals required for this rule.
    project str
    The name or id of the project to add the approval rules.
    applies_to_all_protected_branches bool
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    disable_importing_default_any_approver_rule_on_create bool
    When this flag is set, the default any_approver rule will not be imported if present.
    group_ids Sequence[int]
    A list of group IDs whose members can approve of the merge request.
    name str
    The name of the approval rule.
    protected_branch_ids Sequence[int]
    A list of protected branch IDs (not branch names) for which the rule applies.
    rule_type str
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    user_ids Sequence[int]
    A list of specific User IDs to add to the list of approvers.
    approvalsRequired Number
    The number of approvals required for this rule.
    project String
    The name or id of the project to add the approval rules.
    appliesToAllProtectedBranches Boolean
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    disableImportingDefaultAnyApproverRuleOnCreate Boolean
    When this flag is set, the default any_approver rule will not be imported if present.
    groupIds List<Number>
    A list of group IDs whose members can approve of the merge request.
    name String
    The name of the approval rule.
    protectedBranchIds List<Number>
    A list of protected branch IDs (not branch names) for which the rule applies.
    ruleType String
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    userIds List<Number>
    A list of specific User IDs to add to the list of approvers.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ProjectApprovalRule Resource

    Get an existing ProjectApprovalRule 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?: ProjectApprovalRuleState, opts?: CustomResourceOptions): ProjectApprovalRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            applies_to_all_protected_branches: Optional[bool] = None,
            approvals_required: Optional[int] = None,
            disable_importing_default_any_approver_rule_on_create: Optional[bool] = None,
            group_ids: Optional[Sequence[int]] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            protected_branch_ids: Optional[Sequence[int]] = None,
            rule_type: Optional[str] = None,
            user_ids: Optional[Sequence[int]] = None) -> ProjectApprovalRule
    func GetProjectApprovalRule(ctx *Context, name string, id IDInput, state *ProjectApprovalRuleState, opts ...ResourceOption) (*ProjectApprovalRule, error)
    public static ProjectApprovalRule Get(string name, Input<string> id, ProjectApprovalRuleState? state, CustomResourceOptions? opts = null)
    public static ProjectApprovalRule get(String name, Output<String> id, ProjectApprovalRuleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    AppliesToAllProtectedBranches bool
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    ApprovalsRequired int
    The number of approvals required for this rule.
    DisableImportingDefaultAnyApproverRuleOnCreate bool
    When this flag is set, the default any_approver rule will not be imported if present.
    GroupIds List<int>
    A list of group IDs whose members can approve of the merge request.
    Name string
    The name of the approval rule.
    Project string
    The name or id of the project to add the approval rules.
    ProtectedBranchIds List<int>
    A list of protected branch IDs (not branch names) for which the rule applies.
    RuleType string
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    UserIds List<int>
    A list of specific User IDs to add to the list of approvers.
    AppliesToAllProtectedBranches bool
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    ApprovalsRequired int
    The number of approvals required for this rule.
    DisableImportingDefaultAnyApproverRuleOnCreate bool
    When this flag is set, the default any_approver rule will not be imported if present.
    GroupIds []int
    A list of group IDs whose members can approve of the merge request.
    Name string
    The name of the approval rule.
    Project string
    The name or id of the project to add the approval rules.
    ProtectedBranchIds []int
    A list of protected branch IDs (not branch names) for which the rule applies.
    RuleType string
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    UserIds []int
    A list of specific User IDs to add to the list of approvers.
    appliesToAllProtectedBranches Boolean
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    approvalsRequired Integer
    The number of approvals required for this rule.
    disableImportingDefaultAnyApproverRuleOnCreate Boolean
    When this flag is set, the default any_approver rule will not be imported if present.
    groupIds List<Integer>
    A list of group IDs whose members can approve of the merge request.
    name String
    The name of the approval rule.
    project String
    The name or id of the project to add the approval rules.
    protectedBranchIds List<Integer>
    A list of protected branch IDs (not branch names) for which the rule applies.
    ruleType String
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    userIds List<Integer>
    A list of specific User IDs to add to the list of approvers.
    appliesToAllProtectedBranches boolean
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    approvalsRequired number
    The number of approvals required for this rule.
    disableImportingDefaultAnyApproverRuleOnCreate boolean
    When this flag is set, the default any_approver rule will not be imported if present.
    groupIds number[]
    A list of group IDs whose members can approve of the merge request.
    name string
    The name of the approval rule.
    project string
    The name or id of the project to add the approval rules.
    protectedBranchIds number[]
    A list of protected branch IDs (not branch names) for which the rule applies.
    ruleType string
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    userIds number[]
    A list of specific User IDs to add to the list of approvers.
    applies_to_all_protected_branches bool
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    approvals_required int
    The number of approvals required for this rule.
    disable_importing_default_any_approver_rule_on_create bool
    When this flag is set, the default any_approver rule will not be imported if present.
    group_ids Sequence[int]
    A list of group IDs whose members can approve of the merge request.
    name str
    The name of the approval rule.
    project str
    The name or id of the project to add the approval rules.
    protected_branch_ids Sequence[int]
    A list of protected branch IDs (not branch names) for which the rule applies.
    rule_type str
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    user_ids Sequence[int]
    A list of specific User IDs to add to the list of approvers.
    appliesToAllProtectedBranches Boolean
    Whether the rule is applied to all protected branches. If set to 'true', the value of protected_branch_ids is ignored. Default is 'false'.
    approvalsRequired Number
    The number of approvals required for this rule.
    disableImportingDefaultAnyApproverRuleOnCreate Boolean
    When this flag is set, the default any_approver rule will not be imported if present.
    groupIds List<Number>
    A list of group IDs whose members can approve of the merge request.
    name String
    The name of the approval rule.
    project String
    The name or id of the project to add the approval rules.
    protectedBranchIds List<Number>
    A list of protected branch IDs (not branch names) for which the rule applies.
    ruleType String
    String, defaults to 'regular'. The type of rule. any_approver is a pre-configured default rule with approvals_required at 0. Valid values are regular, any_approver.
    userIds List<Number>
    A list of specific User IDs to add to the list of approvers.

    Import

    GitLab project approval rules can be imported using a key composed of <project-id>:<rule-id>, e.g.

    $ pulumi import gitlab:index/projectApprovalRule:ProjectApprovalRule example "12345:6"
    

    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 v6.10.0 published on Monday, Mar 25, 2024 by Pulumi