Skip to content

Commit e6e3922

Browse files
committed
resource/gitlab_project: Add many attributes to align with upstream API
1 parent 49db985 commit e6e3922

File tree

3 files changed

+974
-62
lines changed

3 files changed

+974
-62
lines changed

docs/resources/project.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,40 @@ resource "gitlab_project" "example-two" {
4949
### Optional
5050

5151
- **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`.
5253
- **approvals_before_merge** (Number) Number of merge request approvals required for merging. Default is 0.
5354
- **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.
5455
- **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.
5560
- **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`.
5664
- **ci_config_path** (String) Custom Path to CI config file.
5765
- **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`.
5868
- **container_registry_enabled** (Boolean) Enable container registry for the project.
5969
- **default_branch** (String) The default branch for the project.
6070
- **description** (String) A description of the project.
71+
- **emails_disabled** (Boolean) Disable email notifications.
72+
- **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`.
6174
- **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).
6275
- **id** (String) The ID of this resource.
6376
- **import_url** (String) Git URL to a repository to be imported.
6477
- **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`.
6579
- **issues_enabled** (Boolean) Enable issue tracking for the project.
6680
- **issues_template** (String) Sets the template for new issues in the project.
6781
- **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.)
6883
- **merge_method** (String) Set to `ff` to create fast-forward merges
6984
- **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`.
7086
- **merge_requests_enabled** (Boolean) Enable merge requests for the project.
7187
- **merge_requests_template** (String) Sets the template for new merge requests in the project.
7288
- **merge_trains_enabled** (Boolean) Enable or disable merge trains. Requires `merge_pipelines_enabled` to be set to `true` to take effect.
@@ -77,22 +93,33 @@ resource "gitlab_project" "example-two" {
7793
- **only_allow_merge_if_all_discussions_are_resolved** (Boolean) Set to true if you want allow merges only if all discussions are resolved.
7894
- **only_allow_merge_if_pipeline_succeeds** (Boolean) Set to true if you want allow merges only if a pipeline succeeds.
7995
- **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`.
8097
- **packages_enabled** (Boolean) Enable packages repository for the project.
8198
- **pages_access_level** (String) Enable pages access control
8299
- **path** (String) The path of the repository.
83100
- **pipelines_enabled** (Boolean) Enable pipelines for the project.
84101
- **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.
85103
- **push_rules** (Block List, Max: 1) Push rules for the project. (see [below for nested schema](#nestedblock--push_rules))
86104
- **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)
87107
- **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`.
88111
- **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`.
89113
- **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.)
90115
- **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.
92117
- **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`.
93118
- **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.
94120
- **use_custom_template** (Boolean) Use either custom instance or group (with group_with_project_templates_id) project template (enterprise edition).
95121
- **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`.
96123
- **wiki_enabled** (Boolean) Enable wiki for the project.
97124

98125
### Read-Only
@@ -103,6 +130,23 @@ resource "gitlab_project" "example-two" {
103130
- **ssh_url_to_repo** (String) URL that can be provided to `git clone` to clone the
104131
- **web_url** (String) URL that can be used to find the project in a browser.
105132

133+
<a id="nestedblock--container_expiration_policy"></a>
134+
### 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.
148+
149+
106150
<a id="nestedblock--push_rules"></a>
107151
### Nested Schema for `push_rules`
108152

0 commit comments

Comments
 (0)