You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-sources/project.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,33 +32,74 @@ data "gitlab_project" "example" {
32
32
33
33
-**id** (String) The integer or path with namespace that uniquely identifies the project within the gitlab install.
34
34
-**path_with_namespace** (String) The path of the repository with namespace.
35
+
-**public_builds** (Boolean) If true, jobs can be viewed by non-project members.
35
36
36
37
### Read-Only
37
38
39
+
-**analytics_access_level** (String) Set the analytics access level. Valid values are `disabled`, `private`, `enabled`.
38
40
-**archived** (Boolean) Whether the project is in read-only mode (archived).
41
+
-**auto_cancel_pending_pipelines** (String) Auto-cancel pending pipelines. This isn’t a boolean, but enabled/disabled.
42
+
-**auto_devops_deploy_strategy** (String) Auto Deploy strategy. Valid values are `continuous`, `manual`, `timed_incremental`.
43
+
-**auto_devops_enabled** (Boolean) Enable Auto DevOps for this project.
44
+
-**autoclose_referenced_issues** (Boolean) Set whether auto-closing referenced issues on default branch.
45
+
-**build_git_strategy** (String) The Git strategy. Defaults to fetch.
46
+
-**build_timeout** (Number) The maximum amount of time, in seconds, that a job can run.
47
+
-**builds_access_level** (String) Set the builds access level. Valid values are `disabled`, `private`, `enabled`.
48
+
-**container_expiration_policy** (List of Object) Set the image cleanup policy for this project. **Note**: this field is sometimes named `container_expiration_policy_attributes` in the GitLab Upstream API. (see [below for nested schema](#nestedatt--container_expiration_policy))
49
+
-**container_registry_access_level** (String) Set visibility of container registry, for this project. Valid values are `disabled`, `private`, `enabled`.
39
50
-**default_branch** (String) The default branch for the project.
40
51
-**description** (String) A description of the project.
-**allow_merge_on_skipped_pipeline** (Boolean) Set to true if you want to treat skipped pipelines as if they finished with success.
52
+
-**analytics_access_level** (String) Set the analytics access level. Valid values are `disabled`, `private`, `enabled`.
52
53
-**approvals_before_merge** (Number) Number of merge request approvals required for merging. Default is 0.
53
54
-**archive_on_destroy** (Boolean) Set to `true` to archive the project instead of deleting on destroy. If set to `true` it will entire omit the `DELETE` operation.
54
55
-**archived** (Boolean) Whether the project is in read-only mode (archived). Repositories can be archived/unarchived by toggling this parameter.
56
+
-**auto_cancel_pending_pipelines** (String) Auto-cancel pending pipelines. This isn’t a boolean, but enabled/disabled.
57
+
-**auto_devops_deploy_strategy** (String) Auto Deploy strategy. Valid values are `continuous`, `manual`, `timed_incremental`.
58
+
-**auto_devops_enabled** (Boolean) Enable Auto DevOps for this project.
59
+
-**autoclose_referenced_issues** (Boolean) Set whether auto-closing referenced issues on default branch.
55
60
-**build_coverage_regex** (String) Test coverage parsing for the project.
61
+
-**build_git_strategy** (String) The Git strategy. Defaults to fetch.
62
+
-**build_timeout** (Number) The maximum amount of time, in seconds, that a job can run.
63
+
-**builds_access_level** (String) Set the builds access level. Valid values are `disabled`, `private`, `enabled`.
56
64
-**ci_config_path** (String) Custom Path to CI config file.
57
65
-**ci_forward_deployment_enabled** (Boolean) When a new deployment job starts, skip older deployment jobs that are still pending.
66
+
-**container_expiration_policy** (Block List, Max: 1) Set the image cleanup policy for this project. **Note**: this field is sometimes named `container_expiration_policy_attributes` in the GitLab Upstream API. (see [below for nested schema](#nestedblock--container_expiration_policy))
67
+
-**container_registry_access_level** (String) Set visibility of container registry, for this project. Valid values are `disabled`, `private`, `enabled`.
58
68
-**container_registry_enabled** (Boolean) Enable container registry for the project.
59
69
-**default_branch** (String) The default branch for the project.
60
70
-**description** (String) A description of the project.
-**external_authorization_classification_label** (String) The classification label for the project.
73
+
-**forking_access_level** (String) Set the forking access level. Valid values are `disabled`, `private`, `enabled`.
61
74
-**group_with_project_templates_id** (Number) For group-level custom templates, specifies ID of group from which all the custom project templates are sourced. Leave empty for instance-level templates. Requires use_custom_template to be true (enterprise edition).
62
75
-**id** (String) The ID of this resource.
63
76
-**import_url** (String) Git URL to a repository to be imported.
64
77
-**initialize_with_readme** (Boolean) Create main branch with first commit containing a README.md file.
78
+
-**issues_access_level** (String) Set the issues access level. Valid values are `disabled`, `private`, `enabled`.
65
79
-**issues_enabled** (Boolean) Enable issue tracking for the project.
66
80
-**issues_template** (String) Sets the template for new issues in the project.
67
81
-**lfs_enabled** (Boolean) Enable LFS for the project.
82
+
-**merge_commit_template** (String) Template used to create merge commit message in merge requests. (Introduced in GitLab 14.5.)
68
83
-**merge_method** (String) Set to `ff` to create fast-forward merges
69
84
-**merge_pipelines_enabled** (Boolean) Enable or disable merge pipelines.
85
+
-**merge_requests_access_level** (String) Set the merge requests access level. Valid values are `disabled`, `private`, `enabled`.
70
86
-**merge_requests_enabled** (Boolean) Enable merge requests for the project.
71
87
-**merge_requests_template** (String) Sets the template for new merge requests in the project.
72
88
-**merge_trains_enabled** (Boolean) Enable or disable merge trains. Requires `merge_pipelines_enabled` to be set to `true` to take effect.
-**only_allow_merge_if_all_discussions_are_resolved** (Boolean) Set to true if you want allow merges only if all discussions are resolved.
78
94
-**only_allow_merge_if_pipeline_succeeds** (Boolean) Set to true if you want allow merges only if a pipeline succeeds.
79
95
-**only_mirror_protected_branches** (Boolean) Enable only mirror protected branches for a mirrored project.
96
+
-**operations_access_level** (String) Set the operations access level. Valid values are `disabled`, `private`, `enabled`.
80
97
-**packages_enabled** (Boolean) Enable packages repository for the project.
81
98
-**pages_access_level** (String) Enable pages access control
82
99
-**path** (String) The path of the repository.
83
100
-**pipelines_enabled** (Boolean) Enable pipelines for the project.
84
101
-**printing_merge_request_link_enabled** (Boolean) Show link to create/view merge request when pushing from the command line
102
+
-**public_builds** (Boolean) If true, jobs can be viewed by non-project members.
85
103
-**push_rules** (Block List, Max: 1) Push rules for the project. (see [below for nested schema](#nestedblock--push_rules))
86
104
-**remove_source_branch_after_merge** (Boolean) Enable `Delete source branch` option by default for all new merge requests.
105
+
-**repository_access_level** (String) Set the repository access level. Valid values are `disabled`, `private`, `enabled`.
106
+
-**repository_storage** (String) Which storage shard the repository is on. (administrator only)
87
107
-**request_access_enabled** (Boolean) Allow users to request member access.
108
+
-**requirements_access_level** (String) Set the requirements access level. Valid values are `disabled`, `private`, `enabled`.
109
+
-**resolve_outdated_diff_discussions** (Boolean) Automatically resolve merge request diffs discussions on lines changed with a push.
110
+
-**security_and_compliance_access_level** (String) Set the security and compliance access level. Valid values are `disabled`, `private`, `enabled`.
88
111
-**shared_runners_enabled** (Boolean) Enable shared runners for this project.
112
+
-**snippets_access_level** (String) Set the snippets access level. Valid values are `disabled`, `private`, `enabled`.
89
113
-**snippets_enabled** (Boolean) Enable snippets for the project.
114
+
-**squash_commit_template** (String) Template used to create squash commit message in merge requests. (Introduced in GitLab 14.6.)
90
115
-**squash_option** (String) Squash commits when merge request. Valid values are `never`, `always`, `default_on`, or `default_off`. The default value is `default_off`. [GitLab >= 14.1]
91
-
-**tags** (Set of String) Tags (topics) of the project.
116
+
-**tags** (Set of String) The list of tags for a project; put array of tags, that should be finally assigned to a project. Use topics instead.
92
117
-**template_name** (String) When used without use_custom_template, name of a built-in project template. When used with use_custom_template, name of a custom project template. This option is mutually exclusive with `template_project_id`.
93
118
-**template_project_id** (Number) When used with use_custom_template, project ID of a custom project template. This is preferable to using template_name since template_name may be ambiguous (enterprise edition). This option is mutually exclusive with `template_name`.
119
+
-**topics** (Set of String) The list of topics for the project.
94
120
-**use_custom_template** (Boolean) Use either custom instance or group (with group_with_project_templates_id) project template (enterprise edition).
95
121
-**visibility_level** (String) Set to `public` to create a public project.
122
+
-**wiki_access_level** (String) Set the wiki access level. Valid values are `disabled`, `private`, `enabled`.
96
123
-**wiki_enabled** (Boolean) Enable wiki for the project.
### Nested Schema for `container_expiration_policy`
135
+
136
+
Optional:
137
+
138
+
-**cadence** (String) The cadence of the policy. Valid values are: `1d`, `7d`, `14d`, `1month`, `3month`.
139
+
-**enabled** (Boolean) If true, the policy is enabled.
140
+
-**keep_n** (Number) The number of images to keep.
141
+
-**name_regex_delete** (String) The regular expression to match image names to delete. **Note**: the upstream API has some inconsistencies with the `name_regex` field here. It's basically unusable at the moment.
142
+
-**name_regex_keep** (String) The regular expression to match image names to keep.
143
+
-**older_than** (String) The number of days to keep images.
144
+
145
+
Read-Only:
146
+
147
+
-**next_run_at** (String) The next time the policy will run.
0 commit comments