Skip to content

Commit 196d436

Browse files
Update docs for v16.7.0 release
1 parent 0a70bbd commit 196d436

10 files changed

+95
-46
lines changed

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
## 16.7.0 (2023-12-21)
2+
3+
This release was tested against GitLab 16.5, 16.6, and 16.7 for both CE and EE
4+
5+
DEPRECATION:
6+
7+
- This release updates the recommended Terraform version for this Provider from 1.0.0 to 1.4.0, and updates the version of Terraform we use for CI/CD to 1.4.0 as a result. This is related to a bug that was fixed in Terraform 1.4.0 related to how complex objects are compared. Without using Terraform 1.4.0, the provider cannot guarantee that plan output using nested objects is the same every time. Prior versions will likely still result in a successul plan and apply, but we will ask you to update prior to assisting with issue triage.
8+
9+
IMPROVEMENTS:
10+
11+
- resource/gitlab_branch_protection: Updating `allowed_to_push` will no longer destroy and re-create branch protection, it will instead update it in-place ([!1593](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1593))
12+
- resource/gitlab_group_issue_board: Issue boards now supports the use of scoped labels, and label position can be explicitly configured ([!1771](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1771))
13+
- resource/gitlab_project: Add support for `group_runners_enabled` ([!1735](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1735))
14+
- datasource/gitlab_group: Groups with many projects will now be retrieved significantly faster ([!1770](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1770))
15+
- datasource/gitlab_project: Add support for `group_runners_enabled` ([!1735](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1735))
16+
17+
BUG FIXES:
18+
19+
- resource/gitlab_pipeline_schedule: Fixed an issue where a pipeline schedule with no owner could cause a provider panic ([!1762](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1762))
20+
- resource/gitlab_group_ldap_link: Fixed an issue with `force` that could cause an error when attempting to delete an ldap link ([!1757](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1757))
21+
122
## 16.6.0 (2023-11-16)
223

324
This release was tested against GitLab 16.4, 16.5, and 16.6 for both CE and EE

docs/data-sources/project_protected_branch.md

+23-14
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
page_title: "gitlab_project_protected_branch Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
The gitlab_protected_branch data source allows details of a protected branch to be retrieved by its name and the project it belongs to.
6+
The gitlab_project_protected_branch data source allows details of a protected branch to be retrieved by its name and the project it belongs to.
77
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch
88
---
99

1010
# gitlab_project_protected_branch (Data Source)
1111

12-
The `gitlab_protected_branch` data source allows details of a protected branch to be retrieved by its name and the project it belongs to.
12+
The `gitlab_project_protected_branch` data source allows details of a protected branch to be retrieved by its name and the project it belongs to.
1313

1414
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch)
1515

@@ -35,31 +35,40 @@ data "gitlab_project_protected_branch" "example" {
3535
- `name` (String) The name of the protected branch.
3636
- `project_id` (String) The integer or path with namespace that uniquely identifies the project.
3737

38+
### Optional
39+
40+
- `merge_access_levels` (Block Set) Array of access levels and user(s)/group(s) allowed to merge to protected branch. (see [below for nested schema](#nestedblock--merge_access_levels))
41+
- `push_access_levels` (Block Set) Array of access levels and user(s)/group(s) allowed to push to protected branch. (see [below for nested schema](#nestedblock--push_access_levels))
42+
3843
### Read-Only
3944

4045
- `allow_force_push` (Boolean) Whether force push is allowed.
4146
- `code_owner_approval_required` (Boolean) Reject code pushes that change files listed in the CODEOWNERS file.
4247
- `id` (Number) The ID of this resource.
43-
- `merge_access_levels` (List of Object) Describes which access levels, users, or groups are allowed to perform the action. (see [below for nested schema](#nestedatt--merge_access_levels))
44-
- `push_access_levels` (List of Object) Describes which access levels, users, or groups are allowed to perform the action. (see [below for nested schema](#nestedatt--push_access_levels))
4548

46-
<a id="nestedatt--merge_access_levels"></a>
49+
<a id="nestedblock--merge_access_levels"></a>
4750
### Nested Schema for `merge_access_levels`
4851

52+
Optional:
53+
54+
- `group_id` (Number) The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with `user_id`.
55+
- `user_id` (Number) The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with `group_id`.
56+
4957
Read-Only:
5058

51-
- `access_level` (String)
52-
- `access_level_description` (String)
53-
- `group_id` (Number)
54-
- `user_id` (Number)
59+
- `access_level` (String) Access levels allowed to merge to protected branch. Valid values are: `no one`, `developer`, `maintainer`.
60+
- `access_level_description` (String) Readable description of access level.
5561

5662

57-
<a id="nestedatt--push_access_levels"></a>
63+
<a id="nestedblock--push_access_levels"></a>
5864
### Nested Schema for `push_access_levels`
5965

66+
Optional:
67+
68+
- `group_id` (Number) The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with `user_id`.
69+
- `user_id` (Number) The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with `group_id`.
70+
6071
Read-Only:
6172

62-
- `access_level` (String)
63-
- `access_level_description` (String)
64-
- `group_id` (Number)
65-
- `user_id` (Number)
73+
- `access_level` (String) Access levels allowed to push to protected branch. Valid values are: `no one`, `developer`, `maintainer`.
74+
- `access_level_description` (String) Readable description of access level.

docs/data-sources/project_protected_branches.md

+31-19
Original file line numberDiff line numberDiff line change
@@ -32,40 +32,52 @@ data "gitlab_project_protected_branches" "example" {
3232

3333
- `project_id` (String) The integer or path with namespace that uniquely identifies the project.
3434

35+
### Optional
36+
37+
- `protected_branches` (Block List) A list of protected branches, as defined below. (see [below for nested schema](#nestedblock--protected_branches))
38+
3539
### Read-Only
3640

37-
- `id` (String) The ID of this resource.
38-
- `protected_branches` (List of Object) A list of protected branches, as defined below. (see [below for nested schema](#nestedatt--protected_branches))
41+
- `id` (Number) The ID of this resource.
3942

40-
<a id="nestedatt--protected_branches"></a>
43+
<a id="nestedblock--protected_branches"></a>
4144
### Nested Schema for `protected_branches`
4245

46+
Optional:
47+
48+
- `merge_access_levels` (Block Set) Array of access levels and user(s)/group(s) allowed to merge to protected branch. (see [below for nested schema](#nestedblock--protected_branches--merge_access_levels))
49+
- `push_access_levels` (Block Set) Array of access levels and user(s)/group(s) allowed to push to protected branch. (see [below for nested schema](#nestedblock--protected_branches--push_access_levels))
50+
4351
Read-Only:
4452

45-
- `allow_force_push` (Boolean)
46-
- `code_owner_approval_required` (Boolean)
47-
- `id` (Number)
48-
- `merge_access_levels` (List of Object) (see [below for nested schema](#nestedobjatt--protected_branches--merge_access_levels))
49-
- `name` (String)
50-
- `push_access_levels` (List of Object) (see [below for nested schema](#nestedobjatt--protected_branches--push_access_levels))
53+
- `allow_force_push` (Boolean) Whether force push is allowed.
54+
- `code_owner_approval_required` (Boolean) Reject code pushes that change files listed in the CODEOWNERS file.
55+
- `id` (Number) The ID of this resource.
56+
- `name` (String) The name of the protected branch.
5157

52-
<a id="nestedobjatt--protected_branches--merge_access_levels"></a>
58+
<a id="nestedblock--protected_branches--merge_access_levels"></a>
5359
### Nested Schema for `protected_branches.merge_access_levels`
5460

61+
Optional:
62+
63+
- `group_id` (Number) The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with `user_id`.
64+
- `user_id` (Number) The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with `group_id`.
65+
5566
Read-Only:
5667

57-
- `access_level` (String)
58-
- `access_level_description` (String)
59-
- `group_id` (Number)
60-
- `user_id` (Number)
68+
- `access_level` (String) Access levels allowed to merge to protected branch. Valid values are: `no one`, `developer`, `maintainer`.
69+
- `access_level_description` (String) Readable description of access level.
6170

6271

63-
<a id="nestedobjatt--protected_branches--push_access_levels"></a>
72+
<a id="nestedblock--protected_branches--push_access_levels"></a>
6473
### Nested Schema for `protected_branches.push_access_levels`
6574

75+
Optional:
76+
77+
- `group_id` (Number) The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with `user_id`.
78+
- `user_id` (Number) The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with `group_id`.
79+
6680
Read-Only:
6781

68-
- `access_level` (String)
69-
- `access_level_description` (String)
70-
- `group_id` (Number)
71-
- `user_id` (Number)
82+
- `access_level` (String) Access levels allowed to push to protected branch. Valid values are: `no one`, `developer`, `maintainer`.
83+
- `access_level_description` (String) Readable description of access level.

docs/data-sources/projects.md

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Read-Only:
112112
- `forked_from_project` (List of Object) (see [below for nested schema](#nestedobjatt--projects--forked_from_project))
113113
- `forking_access_level` (String)
114114
- `forks_count` (Number)
115+
- `group_runners_enabled` (Boolean)
115116
- `http_url_to_repo` (String)
116117
- `id` (Number)
117118
- `import_error` (String)

docs/development/CreatingANewResource.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ func (r *gitlabApplicationResource) Create(ctx context.Context, req resource.Cre
314314
}
315315

316316
if !data.Confidential.IsNull() {
317-
options.Confidential = gitlab.Bool(data.Confidential.ValueBool())
317+
options.Confidential = gitlab.Ptr(data.Confidential.ValueBool())
318318
}
319319

320320
// Create application

docs/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ which may be consumed to better understand the behavior of the API.
1818
Use the navigation to the left to read about the valid data sources and resources.
1919

2020
This provider requires at least [Terraform 1.0](https://www.terraform.io/downloads.html).
21+
A minimum of Terraform 1.4.0 is recommended.
2122

2223
## Example Usage
2324

docs/resources/branch_protection.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,18 @@ resource "gitlab_branch_protection" "main" {
9090
### Optional
9191

9292
- `allow_force_push` (Boolean) Can be set to true to allow users with push access to force push.
93-
- `allowed_to_merge` (Block Set) Defines permissions for action. (see [below for nested schema](#nestedblock--allowed_to_merge))
94-
- `allowed_to_push` (Block Set) Defines permissions for action. (see [below for nested schema](#nestedblock--allowed_to_push))
95-
- `allowed_to_unprotect` (Block Set) Defines permissions for action. (see [below for nested schema](#nestedblock--allowed_to_unprotect))
96-
- `code_owner_approval_required` (Boolean) Can be set to true to require code owner approval before merging. Only available own Premium and Ultimate instances.
93+
- `allowed_to_merge` (Block Set) Array of access levels and user(s)/group(s) allowed to merge to protected branch. (see [below for nested schema](#nestedblock--allowed_to_merge))
94+
- `allowed_to_push` (Block Set) Array of access levels and user(s)/group(s) allowed to push to protected branch. (see [below for nested schema](#nestedblock--allowed_to_push))
95+
- `allowed_to_unprotect` (Block Set) Array of access levels and user(s)/group(s) allowed to unprotect push to protected branch. (see [below for nested schema](#nestedblock--allowed_to_unprotect))
96+
- `code_owner_approval_required` (Boolean) Can be set to true to require code owner approval before merging. Only available for Premium and Ultimate instances.
9797
- `merge_access_level` (String) Access levels allowed to merge. Valid values are: `no one`, `developer`, `maintainer`.
9898
- `push_access_level` (String) Access levels allowed to push. Valid values are: `no one`, `developer`, `maintainer`.
9999
- `unprotect_access_level` (String) Access levels allowed to unprotect. Valid values are: `developer`, `maintainer`, `admin`.
100100

101101
### Read-Only
102102

103103
- `branch_protection_id` (Number) The ID of the branch protection (not the branch name).
104-
- `id` (String) The ID of this resource.
104+
- `id` (String) The ID of this Terraform resource. In the format of `<project-id:branch>`.
105105

106106
<a id="nestedblock--allowed_to_merge"></a>
107107
### Nested Schema for `allowed_to_merge`
@@ -113,8 +113,8 @@ Optional:
113113

114114
Read-Only:
115115

116-
- `access_level` (String) Level of access.
117-
- `access_level_description` (String) Readable description of level of access.
116+
- `access_level` (String) Access levels allowed to merge to protected branch. Valid values are: `no one`, `developer`, `maintainer`.
117+
- `access_level_description` (String) Readable description of access level.
118118

119119

120120
<a id="nestedblock--allowed_to_push"></a>
@@ -127,8 +127,8 @@ Optional:
127127

128128
Read-Only:
129129

130-
- `access_level` (String) Level of access.
131-
- `access_level_description` (String) Readable description of level of access.
130+
- `access_level` (String) Access levels allowed to push to protected branch. Valid values are: `no one`, `developer`, `maintainer`.
131+
- `access_level_description` (String) Readable description of access level.
132132

133133

134134
<a id="nestedblock--allowed_to_unprotect"></a>
@@ -141,8 +141,8 @@ Optional:
141141

142142
Read-Only:
143143

144-
- `access_level` (String) Level of access.
145-
- `access_level_description` (String) Readable description of level of access.
144+
- `access_level` (String) Access levels allowed to unprotect push to protected branch. Valid values are: `developer`, `maintainer`, `admin`.
145+
- `access_level_description` (String) Readable description of access level.
146146

147147
## Import
148148

docs/resources/group_issue_board.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ The `gitlab_group_issue_board` resource allows to manage the lifecycle of a issu
2828

2929
### Optional
3030

31+
- `labels` (Set of String) The list of label names which the board should be scoped to.
3132
- `lists` (Block Set) The list of issue board lists. (see [below for nested schema](#nestedblock--lists))
3233
- `milestone_id` (Number) The milestone the board should be scoped to.
3334

@@ -41,8 +42,8 @@ The `gitlab_group_issue_board` resource allows to manage the lifecycle of a issu
4142
Optional:
4243

4344
- `label_id` (Number) The ID of the label the list should be scoped to.
45+
- `position` (Number) The explicit position of the list within the board, zero based.
4446

4547
Read-Only:
4648

4749
- `id` (Number) The ID of the list.
48-
- `position` (Number) The position of the list within the board. The position for the list is based on the its position in the `lists` array.

docs/resources/project.md

+1
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ resource "gitlab_project" "import_private" {
165165
- `feature_flags_access_level` (String) Set the feature flags access level. Valid values are `disabled`, `private`, `enabled`.
166166
- `forked_from_project_id` (Number) The id of the project to fork. During create the project is forked and during an update the fork relation is changed.
167167
- `forking_access_level` (String) Set the forking access level. Valid values are `disabled`, `private`, `enabled`.
168+
- `group_runners_enabled` (Boolean) Enable group runners for this project.
168169
- `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).
169170
- `import_url` (String) Git URL to a repository to be imported. Together with `mirror = true` it will setup a Pull Mirror. This can also be used together with `forked_from_project_id` to setup a Pull Mirror for a fork. The fork takes precedence over the import. Make sure to provide the credentials in `import_url_username` and `import_url_password`. GitLab never returns the credentials, thus the provider cannot detect configuration drift in the credentials. They can also not be imported using `terraform import`. See the examples section for how to properly use it.
170171
- `import_url_password` (String, Sensitive) The password for the `import_url`. The value of this field is used to construct a valid `import_url` and is only related to the provider. This field cannot be imported using `terraform import`. See the examples section for how to properly use it.

docs/resources/project_access_token.md

+3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ page_title: "gitlab_project_access_token Resource - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
66
The gitlab_project_access_token resource allows to manage the lifecycle of a project access token.
7+
~> Use of the timestamp() function with expires_at will cause the resource to be re-created with every apply, it's recommended to use plantimestamp() or a static value instead.
78
Upstream API: GitLab API docs https://docs.gitlab.com/ee/api/project_access_tokens.html
89
---
910

1011
# gitlab_project_access_token (Resource)
1112

1213
The `gitlab_project_access_token` resource allows to manage the lifecycle of a project access token.
1314

15+
~> Use of the `timestamp()` function with expires_at will cause the resource to be re-created with every apply, it's recommended to use `plantimestamp()` or a static value instead.
16+
1417
**Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/project_access_tokens.html)
1518

1619
## Example Usage

0 commit comments

Comments
 (0)