Skip to content

dhoppeIT/terraform-gitlab-project_approval_rule

Repository files navigation

terraform-gitlab-project_approval_rule

Terraform module to manage the following Twingate resources:

  • gitlab_project_approval_rule

Usage

Copy and paste the following code snippet to your Terraform configuration, specify the required variables and run the command terraform init.

module "gitlab_project_approval_rule" {
  source  = "gitlab.com/terraform-child-modules-48151/terraform-gitlab-project-approval-rule/local"
  version = "1.0.0"

  project            = "example-group-48165/example-project"
  name               = "example-rule"
  approvals_required = 1
}

⚠️ This feature requires a GitLab Enterprise instance.

Requirements

Name Version
terraform >= 1.0
gitlab ~> 18.0

Providers

Name Version
gitlab ~> 18.0

Modules

No modules.

Resources

Name Type
gitlab_project_approval_rule.this resource

Inputs

Name Description Type Default Required
applies_to_all_protected_branches Whether the rule is applied to all protected branches bool false no
approvals_required The number of approvals required for this rule number n/a yes
disable_importing_default_any_approver_rule_on_create When this flag is set, the default any_approver rule will not be imported if present bool false no
group_ids A list of group IDs whose members can approve of the merge request list(number) [] no
name The name of the approval rule string n/a yes
project The name or id of the project to add the approval rules string n/a yes
protected_branch_ids A list of protected branch IDs (not branch names) for which the rule applies list(number) [] no
report_type Report type is required when the rule_type is report_approver string null no
rule_type The type of rule string "regular" no
user_ids A list of specific User IDs to add to the list of approvers list(number) [] no

Outputs

Name Description
id The ID of this resource

Authors

Created and maintained by Dennis Hoppe.

License

Apache 2 licensed. See LICENSE for full details.