{"id":21639732,"url":"https://github.com/dasmeta/terraform-gitlab-project","last_synced_at":"2026-03-05T19:13:24.458Z","repository":{"id":103060587,"uuid":"539851990","full_name":"dasmeta/terraform-gitlab-project","owner":"dasmeta","description":"Terraform modules from DasMeta to manage GitLab resources","archived":false,"fork":false,"pushed_at":"2024-03-13T13:40:27.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T03:16:49.850Z","etag":null,"topics":["gitlab","gitlab-ci","gitlab-runner"],"latest_commit_sha":null,"homepage":"https://www.dasmeta.com","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dasmeta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-09-22T07:23:40.000Z","updated_at":"2022-10-22T11:41:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a0e0d13-ae9e-40dc-bfff-570833f946ea","html_url":"https://github.com/dasmeta/terraform-gitlab-project","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasmeta%2Fterraform-gitlab-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasmeta%2Fterraform-gitlab-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasmeta%2Fterraform-gitlab-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasmeta%2Fterraform-gitlab-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dasmeta","download_url":"https://codeload.github.com/dasmeta/terraform-gitlab-project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244339044,"owners_count":20437169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gitlab","gitlab-ci","gitlab-runner"],"created_at":"2024-11-25T04:14:53.220Z","updated_at":"2026-03-05T19:13:19.411Z","avatar_url":"https://github.com/dasmeta.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Introduction\n\nThis Repository allows to manage the lifecycle of a gitlab project. Create protected branch, add piplines, variables etc.\n\n# gitlab_project\n\n## Configuration of provider\n```bash\n\nterraform {\n  required_providers {\n    gitlab = {\n      source  = \"gitlabhq/gitlab\"\n      version = \"\u003e3.0.0\"\n    }\n  }\n}\n\nprovider \"gitlab\" {\n  token = \"\"  // your gitlab Personal access token\n}\n\n```\n## Minimal example of module\n\n```terraform\n\nmodule \"gitlab_project\" {\n  source  = \"dasmeta/project/gitlab/\"\n  version = \"1.1.1\"\n\n  name                      = \"test-project\"\n  description               = \"Some test project\"\n  initialize_with_readme    = true\n  visibility_level          = \"public\"\n  approvals_before_merge    = 1\n  default_branch            = main\n  merge_method              = \"ff\"   \u003c!-- `ff` to create fast-forward merges. Valid values are `merge`, `rebase_merge`, `ff`.\" --\u003e\n  url                       = \"https://xxxxxxx.xxx\"\n  pipline_schedule_value    = \"test\"\n  pipline_schedule_key      = \"test\"\n}\n```\n\n## Some other example of usage to create variable\n\n```terraform\nmodule \"gitlab_project\" {\n  source  = \"dasmeta/project/gitlab/\"\n  version = \"1.1.1\"\n\n  name                                             = \"test-project\"\n  description                                      = \"Some test project\"\n  visibility_level                                 = \"private\"\n  create_variable                                  = true\n  only_allow_merge_if_all_discussions_are_resolved = true\n  only_allow_merge_if_pipeline_succeeds            = true\n  remove_source_branch_after_merge                 = true\n  project_variable_key                             = \"project_variable_key\"\n  project_variable_value                           = \"project_variable_value\"  \n  masked                                           = true\n  protected                                        = true\n  url                                              = \"https://xxxxxxx.xxx\"\n  pipline_schedule_value                           = \"test\"\n  pipline_schedule_key                             = \"test\"\n\n}\n```\n\n## Some other example of usage with createing webhook, pipline, branch\n\n```terraform\nmodule \"gitlab_project\" {\n  source  = \"dasmeta/project/gitlab/\"\n  version = \"1.1.1\"\n\n  name                                             = \"test-project\"\n  description                                      = \"Some test project\"\n  visibility_level                                 = \"private\"\n  create_webhook                                   = true\n  confidential_issues_events                       = true\n  enable_ssl_verification                          = true\n  create_pipline                                   = true\n  create_branch                                    = true\n  job_events                                       = true\n  pipeline_events                                  = true\n  push_events                                      = true\n  token                                            = true\n  ref                                              = \"main\"\n  cron                                             = \"0 1 * * *\"\n  url                                              = \"https://xxxxxxx.xxx\"\n  pipline_schedule_value                           = \"test\"\n  pipline_schedule_key                             = \"test\"\n  branch_name                                      = \"das-meta\"\n\n}\n```\n\n## Requirements for pre-commit hooks\nfor Run our pre-commit hooks you need to install\n\t- terraform\n\t- terraform-docs\n\n## Require for prevent wrong commit msg\n\n```bash\nnpm install --global git-conventional-commits\n```\n\n## Config for GitHooks\n\n```bash\ngit config core.hooksPath githooks\n```\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_gitlab\"\u003e\u003c/a\u003e [gitlab](#requirement\\_gitlab) | \u003e3.0.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_gitlab\"\u003e\u003c/a\u003e [gitlab](#provider\\_gitlab) | \u003e3.0.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [gitlab_branch.branch](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/branch) | resource |\n| [gitlab_branch_protection.branch_protection](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/branch_protection) | resource |\n| [gitlab_pipeline_schedule.pipline_schedule](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/pipeline_schedule) | resource |\n| [gitlab_pipeline_schedule_variable.pipline_schedule_variable](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/pipeline_schedule_variable) | resource |\n| [gitlab_pipeline_trigger.pipline_trigger](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/pipeline_trigger) | resource |\n| [gitlab_project.this](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/project) | resource |\n| [gitlab_project_hook.project_webhook](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/project_hook) | resource |\n| [gitlab_project_variable.project_variable](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/project_variable) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_active\"\u003e\u003c/a\u003e [active](#input\\_active) | (Boolean) The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially. | `bool` | `false` | no |\n| \u003ca name=\"input_approvals_before_merge\"\u003e\u003c/a\u003e [approvals\\_before\\_merge](#input\\_approvals\\_before\\_merge) | (Optional) Number of merge request approvals required for merging. Default is 0. | `string` | `1` | no |\n| \u003ca name=\"input_branch_name\"\u003e\u003c/a\u003e [branch\\_name](#input\\_branch\\_name) | (String) The name for this branch. | `string` | `\"develop\"` | no |\n| \u003ca name=\"input_confidential_issues_events\"\u003e\u003c/a\u003e [confidential\\_issues\\_events](#input\\_confidential\\_issues\\_events) | (Boolean) Invoke the hook for confidential issues events. | `bool` | `false` | no |\n| \u003ca name=\"input_confidential_note_events\"\u003e\u003c/a\u003e [confidential\\_note\\_events](#input\\_confidential\\_note\\_events) | (Boolean) Invoke the hook for confidential notes events. | `bool` | `false` | no |\n| \u003ca name=\"input_create\"\u003e\u003c/a\u003e [create](#input\\_create) | Boolean to create the resource. Defaults to true. | `bool` | `true` | no |\n| \u003ca name=\"input_create_branch\"\u003e\u003c/a\u003e [create\\_branch](#input\\_create\\_branch) | Boolean to create the branch. Defaults to true. | `bool` | `true` | no |\n| \u003ca name=\"input_create_pipline\"\u003e\u003c/a\u003e [create\\_pipline](#input\\_create\\_pipline) | Boolean to create the pipline. Defaults to true. | `bool` | `true` | no |\n| \u003ca name=\"input_create_variable\"\u003e\u003c/a\u003e [create\\_variable](#input\\_create\\_variable) | Boolean to create the resource variable. Defaults to true. | `bool` | `true` | no |\n| \u003ca name=\"input_create_webhook\"\u003e\u003c/a\u003e [create\\_webhook](#input\\_create\\_webhook) | Boolean to create the webhook. Defaults to true. | `bool` | `true` | no |\n| \u003ca name=\"input_cron\"\u003e\u003c/a\u003e [cron](#input\\_cron) | (String) The cron (e.g. 0 1 * * *). | `string` | `\"0 1 * * *\"` | no |\n| \u003ca name=\"input_default_branch\"\u003e\u003c/a\u003e [default\\_branch](#input\\_default\\_branch) | (Optional) The default branch the repository will use. Defaults to main. | `string` | `\"main\"` | no |\n| \u003ca name=\"input_deployment_events\"\u003e\u003c/a\u003e [deployment\\_events](#input\\_deployment\\_events) | (Boolean) Invoke the hook for deployment events. | `bool` | `false` | no |\n| \u003ca name=\"input_description\"\u003e\u003c/a\u003e [description](#input\\_description) | (Optional) A description of the project. | `string` | `\"Repository for testing\"` | no |\n| \u003ca name=\"input_enable_ssl_verification\"\u003e\u003c/a\u003e [enable\\_ssl\\_verification](#input\\_enable\\_ssl\\_verification) | (Boolean) Enable ssl verification when invoking the hook. | `bool` | `false` | no |\n| \u003ca name=\"input_initialize_with_readme\"\u003e\u003c/a\u003e [initialize\\_with\\_readme](#input\\_initialize\\_with\\_readme) | (Optional) Create main branch with first commit containing a README.md file. | `bool` | `false` | no |\n| \u003ca name=\"input_issues_events\"\u003e\u003c/a\u003e [issues\\_events](#input\\_issues\\_events) | (Boolean) Invoke the hook for issues events. | `bool` | `false` | no |\n| \u003ca name=\"input_job_events\"\u003e\u003c/a\u003e [job\\_events](#input\\_job\\_events) | (Boolean) Invoke the hook for job events. | `bool` | `false` | no |\n| \u003ca name=\"input_lfs_enabled\"\u003e\u003c/a\u003e [lfs\\_enabled](#input\\_lfs\\_enabled) | (Optional) Enable LFS for the project. | `bool` | `false` | no |\n| \u003ca name=\"input_masked\"\u003e\u003c/a\u003e [masked](#input\\_masked) | (Boolean) If set to true, the value of the variable will be hidden in job logs. The value must meet the masking requirements. Defaults to false. | `bool` | `false` | no |\n| \u003ca name=\"input_merge_access_level\"\u003e\u003c/a\u003e [merge\\_access\\_level](#input\\_merge\\_access\\_level) | (String) Access levels allowed to merge. Valid values are: no one, developer, maintainer. | `string` | `\"maintainer\"` | no |\n| \u003ca name=\"input_merge_commit_template\"\u003e\u003c/a\u003e [merge\\_commit\\_template](#input\\_merge\\_commit\\_template) | Template used to create merge commit message in merge requests. | `string` | `null` | no |\n| \u003ca name=\"input_merge_method\"\u003e\u003c/a\u003e [merge\\_method](#input\\_merge\\_method) | (Optional) Set to `ff` to create fast-forward merges. Valid values are `merge`, `rebase_merge`, `ff`. | `string` | `\"ff\"` | no |\n| \u003ca name=\"input_merge_requests_events\"\u003e\u003c/a\u003e [merge\\_requests\\_events](#input\\_merge\\_requests\\_events) | (Boolean) Invoke the hook for merge requests. | `bool` | `false` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | The name of the project to be created | `string` | n/a | yes |\n| \u003ca name=\"input_only_allow_merge_if_all_discussions_are_resolved\"\u003e\u003c/a\u003e [only\\_allow\\_merge\\_if\\_all\\_discussions\\_are\\_resolved](#input\\_only\\_allow\\_merge\\_if\\_all\\_discussions\\_are\\_resolved) | (Optional) Set to true if you want to allow merges only if all discussions are resolved. | `bool` | `true` | no |\n| \u003ca name=\"input_only_allow_merge_if_pipeline_succeeds\"\u003e\u003c/a\u003e [only\\_allow\\_merge\\_if\\_pipeline\\_succeeds](#input\\_only\\_allow\\_merge\\_if\\_pipeline\\_succeeds) | (Optional) Set to true if you want to allow merges only if a pipeline succeeds. | `bool` | `true` | no |\n| \u003ca name=\"input_packages_enabled\"\u003e\u003c/a\u003e [packages\\_enabled](#input\\_packages\\_enabled) | (Optional) Enable packages repository for the project. | `bool` | `false` | no |\n| \u003ca name=\"input_pages_access_level\"\u003e\u003c/a\u003e [pages\\_access\\_level](#input\\_pages\\_access\\_level) | (Optional) Enable pages access control. Valid values are `disabled`, `private`, `enabled`, `public`. | `string` | `\"private\"` | no |\n| \u003ca name=\"input_pipeline_events\"\u003e\u003c/a\u003e [pipeline\\_events](#input\\_pipeline\\_events) | (Boolean) Invoke the hook for pipeline events. | `bool` | `false` | no |\n| \u003ca name=\"input_pipline_schedule_key\"\u003e\u003c/a\u003e [pipline\\_schedule\\_key](#input\\_pipline\\_schedule\\_key) | (String) Name of the variable. | `string` | n/a | yes |\n| \u003ca name=\"input_pipline_schedule_value\"\u003e\u003c/a\u003e [pipline\\_schedule\\_value](#input\\_pipline\\_schedule\\_value) | (String) Value of the variable. | `string` | n/a | yes |\n| \u003ca name=\"input_pipline_trigger_description\"\u003e\u003c/a\u003e [pipline\\_trigger\\_description](#input\\_pipline\\_trigger\\_description) | (String) The description of the pipeline trigger. | `string` | `\"\"` | no |\n| \u003ca name=\"input_project_variable_key\"\u003e\u003c/a\u003e [project\\_variable\\_key](#input\\_project\\_variable\\_key) | (String) The name of the variable. | `string` | n/a | yes |\n| \u003ca name=\"input_project_variable_value\"\u003e\u003c/a\u003e [project\\_variable\\_value](#input\\_project\\_variable\\_value) | (String, Sensitive) The value of the variable. | `string` | n/a | yes |\n| \u003ca name=\"input_protected\"\u003e\u003c/a\u003e [protected](#input\\_protected) | (Boolean) If set to true, the variable will be passed only to pipelines running on protected branches and tags. Defaults to false. | `bool` | `false` | no |\n| \u003ca name=\"input_push_access_level\"\u003e\u003c/a\u003e [push\\_access\\_level](#input\\_push\\_access\\_level) | (String) Access levels allowed to push. Valid values are: no one, developer, maintainer. | `string` | `\"maintainer\"` | no |\n| \u003ca name=\"input_push_events\"\u003e\u003c/a\u003e [push\\_events](#input\\_push\\_events) | (Boolean) Invoke the hook for push events. | `bool` | `false` | no |\n| \u003ca name=\"input_push_events_branch_filter\"\u003e\u003c/a\u003e [push\\_events\\_branch\\_filter](#input\\_push\\_events\\_branch\\_filter) | (String) Invoke the hook for push events on matching branches only. | `bool` | `false` | no |\n| \u003ca name=\"input_push_rules\"\u003e\u003c/a\u003e [push\\_rules](#input\\_push\\_rules) | An array containing the push rules object. | `list(object({}))` | \u003cpre\u003e[\u003cbr\u003e  {\u003cbr\u003e    \"commit_committer_check\": true,\u003cbr\u003e    \"prevent_secrets\": true\u003cbr\u003e  }\u003cbr\u003e]\u003c/pre\u003e | no |\n| \u003ca name=\"input_ref\"\u003e\u003c/a\u003e [ref](#input\\_ref) | (String) The branch/tag name to be triggered. | `string` | `\"main\"` | no |\n| \u003ca name=\"input_releases_events\"\u003e\u003c/a\u003e [releases\\_events](#input\\_releases\\_events) | (Boolean) Invoke the hook for releases events. | `bool` | `false` | no |\n| \u003ca name=\"input_remove_source_branch_after_merge\"\u003e\u003c/a\u003e [remove\\_source\\_branch\\_after\\_merge](#input\\_remove\\_source\\_branch\\_after\\_merge) | (Optional) Enable `Delete source branch` option by default for all new merge requests. | `bool` | `true` | no |\n| \u003ca name=\"input_request_access_enabled\"\u003e\u003c/a\u003e [request\\_access\\_enabled](#input\\_request\\_access\\_enabled) | (Optional) Allow users to request member access. | `bool` | `true` | no |\n| \u003ca name=\"input_snippets_enabled\"\u003e\u003c/a\u003e [snippets\\_enabled](#input\\_snippets\\_enabled) | (Optional) Enable snippets for the project. | `bool` | `false` | no |\n| \u003ca name=\"input_suggestion_commit_message\"\u003e\u003c/a\u003e [suggestion\\_commit\\_message](#input\\_suggestion\\_commit\\_message) | The commit message used to apply merge request suggestions. | `string` | `null` | no |\n| \u003ca name=\"input_tag_push_events\"\u003e\u003c/a\u003e [tag\\_push\\_events](#input\\_tag\\_push\\_events) | (Boolean) Invoke the hook for tag push events. | `bool` | `false` | no |\n| \u003ca name=\"input_token\"\u003e\u003c/a\u003e [token](#input\\_token) | (String, Sensitive) A token to present when invoking the hook. The token is not available for imported resources. | `bool` | `false` | no |\n| \u003ca name=\"input_url\"\u003e\u003c/a\u003e [url](#input\\_url) | (String) The url of the hook to invoke. | `string` | n/a | yes |\n| \u003ca name=\"input_visibility_level\"\u003e\u003c/a\u003e [visibility\\_level](#input\\_visibility\\_level) | (Optional) Set to `public` to create a public project. Valid values are `private`, `internal`, `public`. | `string` | `\"private\"` | no |\n| \u003ca name=\"input_wiki_enabled\"\u003e\u003c/a\u003e [wiki\\_enabled](#input\\_wiki\\_enabled) | (Optional) Enable wiki for the project. | `bool` | `false` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_gitlab_project_id\"\u003e\u003c/a\u003e [gitlab\\_project\\_id](#output\\_gitlab\\_project\\_id) | n/a |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasmeta%2Fterraform-gitlab-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdasmeta%2Fterraform-gitlab-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasmeta%2Fterraform-gitlab-project/lists"}