Skip to content

Commit 2fb223d

Browse files
Update docs for v17.0.0 release
1 parent 3b1bb15 commit 2fb223d

36 files changed

+423
-87
lines changed

CHANGELOG.md

+55
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
1+
## 17.0.0 (2024-05-16)
2+
3+
This release was tested against GitLab 17.0, 16.11, and 16.10 for both CE and EE
4+
5+
KNOWN ISSUES:
6+
7+
- `gitlab_current_user` returns an empty string for `public_email` ([#6305](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/issues/6305))
8+
9+
BREAKING CHANGES:
10+
11+
- resources/project_protected_environment: Removed support for `required_approval_count` field, use `required_approvals` in `approval_rules` or `deploy_access_level` instead ([!1940](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1940))
12+
- resources/group_protected_environment: Removed support for `required_approval_count` field, use `required_approvals` in `approval_rules` or `deploy_access_level` instead ([!1940](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1940))
13+
- resources/gitlab_group: Removed a version check related to `commit_committer_check` and `reject_unsigned_commits` that would prevent their use in versions prior to GitLab 16.4. If used with versions earlier than 16.4, these attributes will cause an error instead of being excluded. ([!1937](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1937))
14+
- resources/gitlab_group: Removed support for `emails_disabled`, use `emails_enabled` instead ([!1929](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1929))
15+
- resources/gitlab_project: Removed support for `emails_disabled`, use `emails_enabled` instead ([!1929](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1929))
16+
- resources/gitlab_pipeline_schedule: `ref` now requires the full ref instead of allowing the use of the short ref. If you previously used `main`, you now need to use `refs/heads/main` instead, for example ([!1923](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1923))
17+
- resources/gitlab_pipeline_trigger: `token` can no longer be imported. ([!1905](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1905))
18+
- resources/gitlab_pipeline_trigger: Updating the `project` attribute will now force the creation of a new pipeline trigger ([!1905](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1905))
19+
- data/gitlab_group(s): Removed support for `emails_disabled`, use `emails_enabled` instead ([!1929](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1929))
20+
- data/gitlab_project(s): Removed support for `emails_disabled`, use `emails_enabled` instead ([!1929](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1929))
21+
- data/gitlab_project(s): Removed support for `public`, use `visibility` instead ([!1929](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1929))
22+
- `master` is no longer a valid access level on any resource that supports the use of access levels. This impacts the resources listed below. ([!1903](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1903))
23+
- gitlab_group_access_token
24+
- gitlab_group_ldap_link
25+
- gitlab_group_membership
26+
- gitlab_group_share_group
27+
- gitlab_project_access_token
28+
- gitlab_project_membership
29+
- gitlab_project_share_group
30+
31+
IMPROVEMENTS:
32+
33+
- **New Resource** resource/gitlab_integration_jenkins: Allows managing a project Jenkins integration ([!1919](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1919))
34+
- **New Resource** resource/gitlab_project_push_rules: Allows managing the lifecycle of push rules on a project ([!1893](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1893))
35+
- **New Resource** resource/gitlab_project_job_token_scopes: This resource sets a strict list of project job token scopes, and removes any job token scopes not managed by the resource. This can be useful to explicitly deny job token scopes on a project. ([!1907](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1907))
36+
- resources/gitlab_pipeline_schedule_variable: Added support for the use of `variable_type` ([!1952](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1952))
37+
- resources/gitlab_group: Added support for the use of `commit_committer_name_check` to the `push_rules` block ([!1937](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1937))
38+
- resources/gitlab_project: Added support for the use of `commit_committer_name_check` to the `push_rules` block ([!1918](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1918))
39+
- resources/gitlab_instance_variable: Added support for the use of `description` ([!1950](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1950))
40+
- resources/gitlab_user_runner: Added example documentation for this resource to make it easier to consume ([!1928](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1928))
41+
- resources/gitlab_application_settings: Add support for `minimum_password_length` to the resource ([!1917](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1917))
42+
- resources/gitlab_personal_access_token: Updated the API used to read personal access token data, which improves performance of this resource in situations where many tokens are being maintained, and improves reliability of the resource in high concurrency situations ([!1908](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1908))
43+
- data/gitlab_instance_variable: Added support for `description` ([!1950](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1950))
44+
- provider: Added documentation that the use of Project Access Tokens or Group Access Tokens may not work with all resources ([!1928](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1928))
45+
46+
BUG FIXES:
47+
48+
- resources/gitlab_pipeline_schedule: Fixed a provider crash in situations where the scheduled pipeline fails to create ([!1899](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1899))
49+
- resources/gitlab_group: Fixed a provider error when attempting to create groups with `push_rules` on GitLab CE where `push_rules` are not supported ([!1891](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1891))
50+
- resources/gitlab_group_access_token: Fixed an issue with token rotation using `rotation_configuration` where tokens wouldn't rotate properly after `expires_at` was stored in state. Added additional debug logging for token rotation. ([!1953](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1953))
51+
- resources/gitlab_group_access_token: Fixed an issue with token rotation where manually managing expiration using `expires_at` would encounter an error after updating `expires_at` twice ([!1916](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1916))
52+
- resources/gitlab_project_access_token: Fixed an issue with token rotation using `rotation_configuration` where tokens wouldn't rotate properly after `expires_at` was stored in state. Added additional debug logging for token rotation. ([!1953](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1953))
53+
- resources/gitlab_project_access_token: Fixed an issue with token rotation where manually managing expiration using `expires_at` would encounter an error after updating `expires_at` twice ([!1916](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1916))
54+
- resources/gitlab_pipeline_trigger: Fixed a bug where applying TF with different users could corrupt the pipeline trigger `token` [!1905](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1905)
55+
156
## 16.11.0 (2024-04-18)
257

358
This release was tested against GitLab 16.9, 16.10, and 16.11 for both CE and EE

docs/data-sources/group_subgroups.md

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ Read-Only:
5959
- `created_at` (String)
6060
- `default_branch_protection` (Number)
6161
- `description` (String)
62-
- `emails_disabled` (Boolean)
6362
- `emails_enabled` (Boolean)
6463
- `file_template_project_id` (Number)
6564
- `full_name` (String)

docs/data-sources/instance_variable.md

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ data "gitlab_instance_variable" "foo" {
3030

3131
### Read-Only
3232

33+
- `description` (String) The description of the variable. Maximum of 255 characters.
3334
- `id` (String) The ID of this resource.
3435
- `masked` (Boolean) If set to `true`, the value of the variable will be hidden in job logs. The value must meet the [masking requirements](https://docs.gitlab.com/ee/ci/variables/#masked-variables). Defaults to `false`.
3536
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.

docs/data-sources/instance_variables.md

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ data "gitlab_instance_variables" "vars" {}
3232

3333
Read-Only:
3434

35+
- `description` (String)
3536
- `key` (String)
3637
- `masked` (Boolean)
3738
- `protected` (Boolean)

docs/data-sources/project.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ data "gitlab_project" "example" {
5555
- `container_registry_access_level` (String) Set visibility of container registry, for this project. Valid values are `disabled`, `private`, `enabled`.
5656
- `default_branch` (String) The default branch for the project.
5757
- `description` (String) A description of the project.
58-
- `emails_disabled` (Boolean, Deprecated) Disable email notifications.
5958
- `emails_enabled` (Boolean) Enable email notifications.
6059
- `empty_repo` (Boolean) Whether the project is empty.
6160
- `environments_access_level` (String) Set the environments access level. Valid values are `disabled`, `private`, `enabled`.
@@ -126,6 +125,7 @@ Read-Only:
126125
- `author_email_regex` (String)
127126
- `branch_name_regex` (String)
128127
- `commit_committer_check` (Boolean)
128+
- `commit_committer_name_check` (Boolean)
129129
- `commit_message_negative_regex` (String)
130130
- `commit_message_regex` (String)
131131
- `deny_delete_tag` (Boolean)

docs/data-sources/project_membership.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ page_title: "gitlab_project_membership Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
66
The gitlab_project_membership data source allows to list and filter all members of a project specified by either its id or full path.
7-
-> Note exactly one of projectid or fullpath must be provided.
7+
-> Note exactly one of project_id or full_path must be provided.
88
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/members.html#list-all-members-of-a-group-or-project
99
---
1010

docs/data-sources/projects.md

-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ Read-Only:
105105
- `custom_attributes` (List of Map of String)
106106
- `default_branch` (String)
107107
- `description` (String)
108-
- `emails_disabled` (Boolean)
109108
- `emails_enabled` (Boolean)
110109
- `empty_repo` (Boolean)
111110
- `environments_access_level` (String)
@@ -150,7 +149,6 @@ Read-Only:
150149
- `path` (String)
151150
- `path_with_namespace` (String)
152151
- `permissions` (List of Object) (see [below for nested schema](#nestedobjatt--projects--permissions))
153-
- `public` (Boolean)
154152
- `public_builds` (Boolean)
155153
- `readme_url` (String)
156154
- `releases_access_level` (String)

docs/index.md

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ Use the navigation to the left to read about the valid data sources and resource
2020
This provider requires at least [Terraform 1.0](https://www.terraform.io/downloads.html).
2121
A minimum of Terraform 1.4.0 is recommended.
2222

23+
-> Using a Project or Group access token may cause issues with some resources, as those token types don't
24+
have full access to every API. This is also true when using a `CI_JOB_TOKEN`. Consider using a dedicated
25+
Personal Access Token or Service Account if you are experiencing permission errors when adding resources.
26+
2327
## Example Usage
2428

2529
```terraform

docs/resources/application_settings.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ subcategory: ""
55
description: |-
66
The gitlab_application_settings resource allows to manage the GitLab application settings.
77
~> This is an experimental resource. By nature it doesn't properly fit into how Terraform resources are meant to work.
8-
Feel free to join the discussion https://gitlab.com/gitlab-org/terraform-provider-gitlab/issues/957 if you have any
9-
ideas or questions regarding this resource.
8+
Feel free to join the discussion https://gitlab.com/gitlab-org/terraform-provider-gitlab/issues/957 if you have any
9+
ideas or questions regarding this resource.
1010
~> All gitlab_application_settings use the same ID gitlab.
1111
!> This resource does not implement any destroy logic, it's a no-op at this point.
12-
It's also not possible to revert to the previous settings.
12+
It's also not possible to revert to the previous settings.
1313
-> Requires at administrative privileges on GitLab.
1414
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/settings.html
1515
---
@@ -190,6 +190,7 @@ resource "gitlab_application_settings" "this" {
190190
- `max_personal_access_token_lifetime` (Number) Maximum allowable lifetime for access tokens in days.
191191
- `max_ssh_key_lifetime` (Number) Maximum allowable lifetime for SSH keys in days. Introduced in GitLab 14.6.
192192
- `metrics_method_call_threshold` (Number) A method call is only tracked when it takes longer than the given amount of milliseconds.
193+
- `minimum_password_length` (Number) Indicates whether passwords require a minimum length. Introduced in GitLab 15.1. Premium and Ultimate only.
193194
- `mirror_available` (Boolean) Allow repository mirroring to configured by project Maintainers. If disabled, only Administrators can configure repository mirroring.
194195
- `mirror_capacity_threshold` (Number) Minimum capacity to be available before scheduling more mirrors preemptively.
195196
- `mirror_max_capacity` (Number) Maximum number of mirrors that can be synchronizing at the same time.

docs/resources/branch_protection.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ subcategory: ""
55
description: |-
66
The gitlab_branch_protection resource allows to manage the lifecycle of a protected branch of a repository.
77
~> Branch Protection Behavior for the default branch
8-
Depending on the GitLab instance, group or project setting the default branch of a project is created automatically by GitLab behind the scenes.
9-
Due to some https://gitlab.com/gitlab-org/terraform-provider-gitlab/issues/792 limitations https://discuss.hashicorp.com/t/ignore-the-order-of-a-complex-typed-list/42242 in the Terraform Provider SDK and the GitLab API,
10-
when creating a new project and trying to manage the branch protection setting for its default branch the gitlab_branch_protection resource will
11-
automatically take ownership of the default branch without an explicit import by unprotecting and properly protecting it again.
12-
Having multiple gitlab_branch_protection resources for the same project and default branch will result in them overriding each other - make sure to only have a single one.
13-
This behavior might change in the future.
8+
Depending on the GitLab instance, group or project setting the default branch of a project is created automatically by GitLab behind the scenes.
9+
Due to some https://gitlab.com/gitlab-org/terraform-provider-gitlab/issues/792 limitations https://discuss.hashicorp.com/t/ignore-the-order-of-a-complex-typed-list/42242 in the Terraform Provider SDK and the GitLab API,
10+
when creating a new project and trying to manage the branch protection setting for its default branch the gitlab_branch_protection resource will
11+
automatically take ownership of the default branch without an explicit import by unprotecting and properly protecting it again.
12+
Having multiple gitlab_branch_protection resources for the same project and default branch will result in them overriding each other - make sure to only have a single one.
13+
This behavior might change in the future.
1414
~> The allowed_to_push, allowed_to_merge, allowed_to_unprotect, unprotect_access_level and code_owner_approval_required attributes require a GitLab Enterprise instance.
1515
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/protected_branches.html
1616
---

docs/resources/cluster_agent.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ subcategory: ""
55
description: |-
66
The gitlab_cluster_agent resource allows to manage the lifecycle of a GitLab Agent for Kubernetes.
77
-> Note that this resource only registers the agent, but doesn't configure it.
8-
The configuration needs to be manually added as described in
9-
the docs https://docs.gitlab.com/ee/user/clusters/agent/install/index.html#create-an-agent-configuration-file.
10-
However, a gitlab_repository_file resource may be used to achieve that.
8+
The configuration needs to be manually added as described in
9+
the docs https://docs.gitlab.com/ee/user/clusters/agent/install/index.html#create-an-agent-configuration-file.
10+
However, a gitlab_repository_file resource may be used to achieve that.
1111
-> Requires at least maintainer permissions on the project.
1212
-> Requires at least GitLab 14.10
1313
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/cluster_agents.html

docs/resources/group.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ resource "gitlab_group" "example-two" {
6262
- `avatar_hash` (String) The hash of the avatar image. Use `filesha256("path/to/avatar.png")` whenever possible. **Note**: this is used to trigger an update of the avatar. If it's not given, but an avatar is given, the avatar will be updated each time.
6363
- `default_branch_protection` (Number) See https://docs.gitlab.com/ee/api/groups.html#options-for-default_branch_protection. Valid values are: `0`, `1`, `2`, `3`, `4`.
6464
- `description` (String) The group's description.
65-
- `emails_disabled` (Boolean, Deprecated) Disable email notifications.
6665
- `emails_enabled` (Boolean) Enable email notifications.
6766
- `extra_shared_runners_minutes_limit` (Number) Can be set by administrators only. Additional CI/CD minutes for this group.
6867
- `ip_restriction_ranges` (List of String) A list of IP addresses or subnet masks to restrict group access. Will be concatenated together into a comma separated string. Only allowed on top level groups.
@@ -100,6 +99,7 @@ Optional:
10099
- `author_email_regex` (String) All commit author emails must match this regex, e.g. `@my-company.com$`.
101100
- `branch_name_regex` (String) All branch names must match this regex, e.g. `(feature|hotfix)\/*`.
102101
- `commit_committer_check` (Boolean) Only commits pushed using verified emails are allowed. **Note** This attribute is only supported in GitLab versions >= 16.4.
102+
- `commit_committer_name_check` (Boolean) Users can only push commits to this repository if the commit author name is consistent with their GitLab account name.
103103
- `commit_message_negative_regex` (String) No commit message is allowed to match this regex, for example `ssh\:\/\/`.
104104
- `commit_message_regex` (String) All commit messages must match this regex, e.g. `Fixed \d+\..*`.
105105
- `deny_delete_tag` (Boolean) Deny deleting a tag.

docs/resources/group_access_token.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ resource "gitlab_group_variable" "example" {
5252

5353
### Optional
5454

55-
- `access_level` (String) The access level for the group access token. Valid values are: `no one`, `minimal`, `guest`, `reporter`, `developer`, `maintainer`, `owner`, `master`. Default is `maintainer`.
55+
- `access_level` (String) The access level for the group access token. Valid values are: `no one`, `minimal`, `guest`, `reporter`, `developer`, `maintainer`, `owner`. Default is `maintainer`.
5656
- `expires_at` (String) When the token will expire, YYYY-MM-DD format.
5757
- `rotation_configuration` (Attributes) The configuration for when to rotate a token automatically. Will not rotate a token until `terraform apply` is run. (see [below for nested schema](#nestedatt--rotation_configuration))
5858

docs/resources/group_ldap_link.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ resource "gitlab_group_ldap_link" "test" {
3434

3535
### Optional
3636

37-
- `access_level` (String, Deprecated) Minimum access level for members of the LDAP group. Valid values are: `no one`, `minimal`, `guest`, `reporter`, `developer`, `maintainer`, `owner`, `master`
37+
- `access_level` (String, Deprecated) Minimum access level for members of the LDAP group. Valid values are: `no one`, `minimal`, `guest`, `reporter`, `developer`, `maintainer`, `owner`
3838
- `cn` (String) The CN of the LDAP group to link with. Required if `filter` is not provided.
3939
- `filter` (String) The LDAP filter for the group. Required if `cn` is not provided. Requires GitLab Premium or above.
4040
- `force` (Boolean) If true, then delete and replace an existing LDAP link if one exists. Will also remove an LDAP link if the parent group is not found.
41-
- `group_access` (String) Minimum access level for members of the LDAP group. Valid values are: `no one`, `minimal`, `guest`, `reporter`, `developer`, `maintainer`, `owner`, `master`
41+
- `group_access` (String) Minimum access level for members of the LDAP group. Valid values are: `no one`, `minimal`, `guest`, `reporter`, `developer`, `maintainer`, `owner`
4242

4343
### Read-Only
4444

0 commit comments

Comments
 (0)