|
1 |
| -# gitlab\_project |
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "gitlab_project Data Source - terraform-provider-gitlab" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Provide details about a specific project in the gitlab provider. The results include the name of the project, path, description, default branch, etc. |
| 7 | +--- |
| 8 | + |
| 9 | +# gitlab_project (Data Source) |
2 | 10 |
|
3 | 11 | Provide details about a specific project in the gitlab provider. The results include the name of the project, path, description, default branch, etc.
|
4 | 12 |
|
5 | 13 | ## Example Usage
|
6 | 14 |
|
7 |
| -```hcl |
| 15 | +```terraform |
8 | 16 | data "gitlab_project" "example" {
|
9 | 17 | id = 30
|
10 | 18 | }
|
11 |
| -``` |
12 | 19 |
|
13 |
| -```hcl |
14 | 20 | data "gitlab_project" "example" {
|
15 | 21 | id = "foo/bar/baz"
|
16 | 22 | }
|
17 | 23 | ```
|
18 | 24 |
|
19 |
| -## Argument Reference |
20 |
| - |
21 |
| -The following arguments are supported: |
22 |
| - |
23 |
| -* `id` - (Required) The integer or path with namespace that uniquely identifies the project within the gitlab install. |
24 |
| - |
25 |
| -## Attributes Reference |
26 |
| - |
27 |
| -The following attributes are exported: |
28 |
| - |
29 |
| -* `path` - The path of the repository. |
30 |
| - |
31 |
| -* `path_with_namespace` - The path of the repository with namespace. |
32 |
| - |
33 |
| -* `namespace_id` - The namespace (group or user) of the project. Defaults to your user. |
34 |
| - See [`gitlab_group`](../resources/group) for an example. |
35 |
| - |
36 |
| -* `description` - A description of the project. |
37 |
| - |
38 |
| -* `default_branch` - The default branch for the project. |
39 |
| - |
40 |
| -* `request_access_enabled` - Allow users to request member access. |
41 |
| - |
42 |
| -* `issues_enabled` - Enable issue tracking for the project. |
43 |
| - |
44 |
| -* `merge_requests_enabled` - Enable merge requests for the project. |
45 |
| - |
46 |
| -* `pipelines_enabled` - Enable pipelines for the project. |
47 |
| - |
48 |
| -* `wiki_enabled` - Enable wiki for the project. |
49 |
| - |
50 |
| -* `snippets_enabled` - Enable snippets for the project. |
51 |
| - |
52 |
| -* `lfs_enabled` - Enable LFS for the project. |
53 |
| - |
54 |
| -* `visibility_level` - Repositories are created as private by default. |
55 |
| - |
56 |
| -* `id` - Integer that uniquely identifies the project within the gitlab install. |
57 |
| - |
58 |
| -* `ssh_url_to_repo` - URL that can be provided to `git clone` to clone the |
59 |
| - repository via SSH. |
60 |
| - |
61 |
| -* `http_url_to_repo` - URL that can be provided to `git clone` to clone the |
62 |
| - repository via HTTP. |
63 |
| - |
64 |
| -* `web_url` - URL that can be used to find the project in a browser. |
65 |
| - |
66 |
| -* `runners_token` - Registration token to use during runner setup. |
67 |
| - |
68 |
| -* `archived` - Whether the project is in read-only mode (archived). |
69 |
| - |
70 |
| -* `remove_source_branch_after_merge` - Enable `Delete source branch` option by default for all new merge requests |
71 |
| - |
72 |
| -* `packages_enabled` - Enable packages repository for the project. |
73 |
| - |
74 |
| -* `push_rules` Push rules for the project (documented below). |
75 |
| - |
76 |
| -## Nested Blocks |
77 |
| - |
78 |
| -### push_rules |
79 |
| - |
80 |
| -For information on push rules, consult the [GitLab documentation](https://docs.gitlab.com/ce/push_rules/push_rules.html#push-rules). |
81 |
| - |
82 |
| -#### Attributes |
83 |
| - |
84 |
| -* `author_email_regex` - All commit author emails must match this regex, e.g. `@my-company.com$`. |
85 |
| - |
86 |
| -* `branch_name_regex` - All branch names must match this regex, e.g. `(feature|hotfix)\/*`. |
87 |
| - |
88 |
| -* `commit_message_regex` - All commit messages must match this regex, e.g. `Fixed \d+\..*`. |
89 |
| - |
90 |
| -* `commit_message_negative_regex` - No commit message is allowed to match this regex, for example `ssh\:\/\/`. |
91 |
| - |
92 |
| -* `file_name_regex` - All commited filenames must not match this regex, e.g. `(jar|exe)$`. |
93 |
| - |
94 |
| -* `commit_committer_check` - Users can only push commits to this repository that were committed with one of their own verified emails. |
95 |
| - |
96 |
| -* `deny_delete_tag` - Deny deleting a tag. |
97 |
| - |
98 |
| -* `member_check` - Restrict commits by author (email) to existing GitLab users. |
99 |
| - |
100 |
| -* `prevent_secrets` - GitLab will reject any files that are likely to contain secrets. |
| 25 | +<!-- schema generated by tfplugindocs --> |
| 26 | +## Schema |
| 27 | + |
| 28 | +### Optional |
| 29 | + |
| 30 | +- **id** (String) The integer or path with namespace that uniquely identifies the project within the gitlab install. |
| 31 | +- **path_with_namespace** (String) The path of the repository with namespace. |
| 32 | + |
| 33 | +### Read-Only |
| 34 | + |
| 35 | +- **archived** (Boolean) Whether the project is in read-only mode (archived). |
| 36 | +- **default_branch** (String) The default branch for the project. |
| 37 | +- **description** (String) A description of the project. |
| 38 | +- **http_url_to_repo** (String) URL that can be provided to `git clone` to clone the |
| 39 | +- **issues_enabled** (Boolean) Enable issue tracking for the project. |
| 40 | +- **lfs_enabled** (Boolean) Enable LFS for the project. |
| 41 | +- **merge_requests_enabled** (Boolean) Enable merge requests for the project. |
| 42 | +- **name** (String) The name of the project. |
| 43 | +- **namespace_id** (Number) The namespace (group or user) of the project. Defaults to your user. |
| 44 | +- **path** (String) The path of the repository. |
| 45 | +- **pipelines_enabled** (Boolean) Enable pipelines for the project. |
| 46 | +- **push_rules** (List of Object) Push rules for the project. (see [below for nested schema](#nestedatt--push_rules)) |
| 47 | +- **remove_source_branch_after_merge** (Boolean) Enable `Delete source branch` option by default for all new merge requests |
| 48 | +- **request_access_enabled** (Boolean) Allow users to request member access. |
| 49 | +- **runners_token** (String) Registration token to use during runner setup. |
| 50 | +- **snippets_enabled** (Boolean) Enable snippets for the project. |
| 51 | +- **ssh_url_to_repo** (String) URL that can be provided to `git clone` to clone the |
| 52 | +- **visibility_level** (String) Repositories are created as private by default. |
| 53 | +- **web_url** (String) URL that can be used to find the project in a browser. |
| 54 | +- **wiki_enabled** (Boolean) Enable wiki for the project. |
| 55 | + |
| 56 | +<a id="nestedatt--push_rules"></a> |
| 57 | +### Nested Schema for `push_rules` |
| 58 | + |
| 59 | +Read-Only: |
| 60 | + |
| 61 | +- **author_email_regex** (String) |
| 62 | +- **branch_name_regex** (String) |
| 63 | +- **commit_committer_check** (Boolean) |
| 64 | +- **commit_message_negative_regex** (String) |
| 65 | +- **commit_message_regex** (String) |
| 66 | +- **deny_delete_tag** (Boolean) |
| 67 | +- **file_name_regex** (String) |
| 68 | +- **max_file_size** (Number) |
| 69 | +- **member_check** (Boolean) |
| 70 | +- **prevent_secrets** (Boolean) |
| 71 | +- **reject_unsigned_commits** (Boolean) |
101 | 72 |
|
102 |
| -* `reject_unsigned_commits` - Reject commit when it’s not signed through GPG. |
103 | 73 |
|
104 |
| -* `max_file_size` - Maximum file size (MB). |
0 commit comments