Skip to content

Commit 3b1bb15

Browse files
Update docs for v16.11.0 release
1 parent d908ca1 commit 3b1bb15

18 files changed

+135
-23
lines changed

CHANGELOG.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
## 16.11.0 (2024-04-18)
2+
3+
This release was tested against GitLab 16.9, 16.10, and 16.11 for both CE and EE
4+
5+
IMPROVEMENTS:
6+
7+
- **New Data Source** data/gitlab_compliance_framework: Allows querying Compliance Frameworks to help retrieve the ID for use in downstream resources ([!1880](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1880))
8+
- resources/gitlab_project_access_token: Added support for the use of `rotation_configuration` to automatically rotate tokens periodically. ([!1887](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1887))
9+
- resources/gitlab_project_access_token: Added support for rotating the token by changing the `expires_at` instead of deleting and re-creating the token. ([!1887](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1887))
10+
- resources/gitlab_group_access_token: Added support for the use of `rotation_configuration` to automatically rotate tokens periodically. ([!1887](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1887))
11+
- resources/gitlab_group_access_token: Added support for rotating the token by changing the `expires_at` instead of deleting and re-creating the token. ([!1887](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1887))
12+
- resources/gitlab_project_access_token: Added support for new token scopes related to AI, k8s, and observability ([!1878](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1878))
13+
- resources/gitlab_group_access_token: Added support for new token scopes related to AI, k8s, and observability ([!1878](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1878))
14+
- resources/gitlab_project: Added support for `emails_enabled` and deprecated support for `emails_disabled`, which will be removed in 17.0 ([!1881](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1881))
15+
- resources/gitlab_project_protected_environment: Added support for `group_inheritance_type` ([!1855](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1855))
16+
- resources/gitlab_group_protected_environment: Added support for `group_inheritance_type` ([!1855](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1855))
17+
- resources/gitlab_project_hook: Added support for `custom_webhook_template` ([!1862](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1862))
18+
- resources/gitlab_group_hook: Added support for `custom_webhook_template` ([!1862](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1862))
19+
- resources/gitlab_group_membership: Added support for `member_role_id`, enabling the use of a custom role when assigning users to a group ([!1809](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1809))
20+
- data/gitlab_project_hook(s): Added support for `custom_webhook_template` ([!1862](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1862))
21+
- data/gitlab_group_hook(s): Added support for `custom_webhook_template` ([!1862](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1862))
22+
23+
BUG FIXES:
24+
25+
- resource/gitlab_project_hook: Fixed an issue where changing the `project` value didn't force a new resource ([!1871](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1871))
26+
127
## 16.10.0 (2024-03-21)
228

329
This release was tested against GitLab 16.8, 16.9, and 16.10 for both CE and EE
@@ -157,7 +183,7 @@ This release was tested against GitLab 16.2, 16.3, and 16.4 for both CE and EE
157183

158184
BREAKING CHANGES:
159185

160-
This breaking change was made early for security reasons. If a configuration relies on the value being non-sensitive,
186+
This breaking change was made early for security reasons. If a configuration relies on the value being non-sensitive,
161187
users can use the [`nonsensitive()`](https://developer.hashicorp.com/terraform/language/functions/nonsensitive) function
162188
in Terraform.
163189

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_compliance_framework Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_compliance_framework data source allows details of a compliance framework to be retrieved by its name and the namespace it belongs to.
7+
Upstream API: GitLab GraphQL API docs https://docs.gitlab.com/ee/api/graphql/reference/#querynamespace
8+
---
9+
10+
# gitlab_compliance_framework (Data Source)
11+
12+
The `gitlab_compliance_framework` data source allows details of a compliance framework to be retrieved by its name and the namespace it belongs to.
13+
14+
**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querynamespace)
15+
16+
## Example Usage
17+
18+
```terraform
19+
data "gitlab_compliance_framework" "example" {
20+
namespace_path = "top-level-group"
21+
name = "HIPAA"
22+
}
23+
```
24+
25+
<!-- schema generated by tfplugindocs -->
26+
## Schema
27+
28+
### Required
29+
30+
- `name` (String) Name for the compliance framework.
31+
- `namespace_path` (String) Full path of the namespace to where the compliance framework is.
32+
33+
### Read-Only
34+
35+
- `color` (String) Color representation of the compliance framework in hex format. e.g. #FCA121.
36+
- `default` (Boolean) Is the compliance framework the default framework for the group.
37+
- `description` (String) Description for the compliance framework.
38+
- `framework_id` (String) Globally unique ID of the compliance framework.
39+
- `id` (String) The ID of this Terraform resource. In the format of `<namespace_path>:<framework_id>`.
40+
- `pipeline_configuration_full_path` (String) Full path of the compliance pipeline configuration stored in a project repository, such as `.gitlab/.compliance-gitlab-ci.yml@compliance/hipaa`. Format: `path/file.y[a]ml@group-name/project-name` **Note**: Ultimate license required.

docs/data-sources/group_hook.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ data "gitlab_group_hook" "example" {
3838

3939
- `confidential_issues_events` (Boolean) Invoke the hook for confidential issues events.
4040
- `confidential_note_events` (Boolean) Invoke the hook for confidential notes events.
41+
- `custom_webhook_template` (String) Set a custom webhook template.
4142
- `deployment_events` (Boolean) Invoke the hook for deployment events.
4243
- `enable_ssl_verification` (Boolean) Enable ssl verification when invoking the hook.
4344
- `group_id` (Number) The id of the group for the hook.

docs/data-sources/group_hooks.md

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Read-Only:
4444

4545
- `confidential_issues_events` (Boolean)
4646
- `confidential_note_events` (Boolean)
47+
- `custom_webhook_template` (String)
4748
- `deployment_events` (Boolean)
4849
- `enable_ssl_verification` (Boolean)
4950
- `group` (String)

docs/data-sources/group_subgroups.md

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Read-Only:
6060
- `default_branch_protection` (Number)
6161
- `description` (String)
6262
- `emails_disabled` (Boolean)
63+
- `emails_enabled` (Boolean)
6364
- `file_template_project_id` (Number)
6465
- `full_name` (String)
6566
- `full_path` (String)

docs/data-sources/project.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ 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) Disable email notifications.
58+
- `emails_disabled` (Boolean, Deprecated) Disable email notifications.
59+
- `emails_enabled` (Boolean) Enable email notifications.
5960
- `empty_repo` (Boolean) Whether the project is empty.
6061
- `environments_access_level` (String) Set the environments access level. Valid values are `disabled`, `private`, `enabled`.
6162
- `external_authorization_classification_label` (String) The classification label for the project.

docs/data-sources/project_hook.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ data "gitlab_project_hook" "example" {
3838

3939
- `confidential_issues_events` (Boolean) Invoke the hook for confidential issues events.
4040
- `confidential_note_events` (Boolean) Invoke the hook for confidential notes events.
41+
- `custom_webhook_template` (String) Set a custom webhook template.
4142
- `deployment_events` (Boolean) Invoke the hook for deployment events.
4243
- `enable_ssl_verification` (Boolean) Enable ssl verification when invoking the hook.
4344
- `id` (String) The ID of this resource.

docs/data-sources/project_hooks.md

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Read-Only:
4444

4545
- `confidential_issues_events` (Boolean)
4646
- `confidential_note_events` (Boolean)
47+
- `custom_webhook_template` (String)
4748
- `deployment_events` (Boolean)
4849
- `enable_ssl_verification` (Boolean)
4950
- `hook_id` (Number)

docs/data-sources/projects.md

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ Read-Only:
106106
- `default_branch` (String)
107107
- `description` (String)
108108
- `emails_disabled` (Boolean)
109+
- `emails_enabled` (Boolean)
109110
- `empty_repo` (Boolean)
110111
- `environments_access_level` (String)
111112
- `external_authorization_classification_label` (String)

docs/resources/group.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ 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) Disable email notifications.
65+
- `emails_disabled` (Boolean, Deprecated) Disable email notifications.
66+
- `emails_enabled` (Boolean) Enable email notifications.
6667
- `extra_shared_runners_minutes_limit` (Number) Can be set by administrators only. Additional CI/CD minutes for this group.
6768
- `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.
6869
- `lfs_enabled` (Boolean) Enable/disable Large File Storage (LFS) for the projects in this group.

docs/resources/group_access_token.md

+26-11
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@
33
page_title: "gitlab_group_access_token Resource - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
The gitlab_group_accesstoken resource allows to manage the lifecycle of a group access token.
7-
-> Group Access Token were introduced in GitLab 14.7
6+
The gitlab_group_access_tokenresource allows to manage the lifecycle of a group access token.
7+
~> Observability scopes are in beta and may not work on all instances. See more details in the documentation https://docs.gitlab.com/ee/operations/tracing.html
8+
~> Use rotation_configuration to automatically rotate tokens instead of using timestamp() as timestamp will cause changes with every plan. terraform apply must still be run to rotate the token.
9+
~> Due to Automatic reuse detection https://docs.gitlab.com/ee/api/group_access_tokens.html#automatic-reuse-detection it's possible that a new Group Access Token will immediately be revoked. Check if an old process using the old token is running if this happens.
810
Upstream API: GitLab REST API https://docs.gitlab.com/ee/api/group_access_tokens.html
911
---
1012

1113
# gitlab_group_access_token (Resource)
1214

13-
The `gitlab_group_access`token resource allows to manage the lifecycle of a group access token.
15+
The `gitlab_group_access_token`resource allows to manage the lifecycle of a group access token.
1416

15-
-> Group Access Token were introduced in GitLab 14.7
17+
~> Observability scopes are in beta and may not work on all instances. See more details in [the documentation](https://docs.gitlab.com/ee/operations/tracing.html)
18+
19+
~> Use `rotation_configuration` to automatically rotate tokens instead of using `timestamp()` as timestamp will cause changes with every plan. `terraform apply` must still be run to rotate the token.
20+
21+
~> Due to [Automatic reuse detection](https://docs.gitlab.com/ee/api/group_access_tokens.html#automatic-reuse-detection) it's possible that a new Group Access Token will immediately be revoked. Check if an old process using the old token is running if this happens.
1622

1723
**Upstream API**: [GitLab REST API](https://docs.gitlab.com/ee/api/group_access_tokens.html)
1824

@@ -40,23 +46,32 @@ resource "gitlab_group_variable" "example" {
4046

4147
### Required
4248

43-
- `expires_at` (String) The token expires at midnight UTC on that date. The date must be in the format YYYY-MM-DD.
44-
- `group` (String) The ID or path of the group to add the group access token to.
49+
- `group` (String) The ID or full path of the group.
4550
- `name` (String) The name of the group access token.
46-
- `scopes` (Set of String) The scope for the group access token. It determines the actions which can be performed when authenticating with this token. Valid values are: `api`, `read_api`, `read_registry`, `write_registry`, `read_repository`, `write_repository`, `create_runner`.
51+
- `scopes` (Set of String) The scopes of the group access token. Valid values are: `api`, `read_api`, `read_user`, `k8s_proxy`, `read_registry`, `write_registry`, `read_repository`, `write_repository`, `create_runner`, `ai_features`, `k8s_proxy`, `read_observability`, `write_observability`
4752

4853
### Optional
4954

50-
- `access_level` (String) The access level for the group access token. Valid values are: `guest`, `reporter`, `developer`, `maintainer`, `owner`.
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`.
56+
- `expires_at` (String) When the token will expire, YYYY-MM-DD format.
57+
- `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))
5158

5259
### Read-Only
5360

5461
- `active` (Boolean) True if the token is active.
5562
- `created_at` (String) Time the token has been created, RFC3339 format.
56-
- `id` (String) The ID of this resource.
63+
- `id` (String) The ID of the group access token.
5764
- `revoked` (Boolean) True if the token is revoked.
58-
- `token` (String, Sensitive) The group access token. This is only populated when creating a new group access token. This attribute is not available for imported resources.
59-
- `user_id` (Number) The user id associated to the token.
65+
- `token` (String, Sensitive) The token of the group access token. **Note**: the token is not available for imported resources.
66+
- `user_id` (Number) The user_id associated to the token.
67+
68+
<a id="nestedatt--rotation_configuration"></a>
69+
### Nested Schema for `rotation_configuration`
70+
71+
Required:
72+
73+
- `expiration_days` (Number) The duration (in days) the new token should be valid for.
74+
- `rotate_before_days` (Number) The duration (in days) before the expiration when the token should be rotated. As an example, if set to 7 days, the token will rotate 7 days before the expiration date, but only when `terraform apply` is run in that timeframe.
6075

6176
## Import
6277

docs/resources/group_hook.md

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ resource "gitlab_group_hook" "all_attributes" {
5757

5858
- `confidential_issues_events` (Boolean) Invoke the hook for confidential issues events.
5959
- `confidential_note_events` (Boolean) Invoke the hook for confidential notes events.
60+
- `custom_webhook_template` (String) Set a custom webhook template.
6061
- `deployment_events` (Boolean) Invoke the hook for deployment events.
6162
- `enable_ssl_verification` (Boolean) Enable ssl verification when invoking the hook.
6263
- `issues_events` (Boolean) Invoke the hook for issues events.

docs/resources/group_membership.md

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ resource "gitlab_group_membership" "test" {
3939
### Optional
4040

4141
- `expires_at` (String) Expiration date for the group membership. Format: `YYYY-MM-DD`
42+
- `member_role_id` (Number) The ID of a custom member role. Only available for Ultimate instances.
4243
- `skip_subresources_on_destroy` (Boolean) Whether the deletion of direct memberships of the removed member in subgroups and projects should be skipped. Only used during a destroy.
4344
- `unassign_issuables_on_destroy` (Boolean) Whether the removed member should be unassigned from any issues or merge requests inside a given group or project. Only used during a destroy.
4445

docs/resources/group_protected_environment.md

+2
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ Optional:
151151

152152
- `access_level` (String) Levels of access required to deploy to this protected environment. Valid values are `developer`, `maintainer`.
153153
- `group_id` (Number) The ID of the group allowed to deploy to this protected environment. The group must be a sub-group under the given group.
154+
- `group_inheritance_type` (Number) Group inheritance allows deploy access levels to take inherited group membership into account. Valid values are `0`, `1`. `0` => Direct group membership only, `1` => All inherited groups. Default: `0`
154155
- `user_id` (Number) The ID of the user allowed to deploy to this protected environment. The user must be a member of the group with Maintainer role or higher.
155156

156157
Read-Only:
@@ -166,6 +167,7 @@ Optional:
166167

167168
- `access_level` (String) Levels of access allowed to approve a deployment to this protected environment. Valid values are `developer`, `maintainer`.
168169
- `group_id` (Number) The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. This is mutually exclusive with user_id.
170+
- `group_inheritance_type` (Number) Group inheritance allows access rules to take inherited group membership into account. Valid values are `0`, `1`. `0` => Direct group membership only, `1` => All inherited groups. Default: `0`
169171
- `required_approvals` (Number) The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
170172
- `user_id` (Number) The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. This is mutually exclusive with group_id and required_approvals.
171173

docs/resources/project.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ resource "gitlab_project" "import_private" {
160160
- `container_registry_enabled` (Boolean, Deprecated) Enable container registry for the project.
161161
- `default_branch` (String) The default branch for the project.
162162
- `description` (String) A description of the project.
163-
- `emails_disabled` (Boolean) Disable email notifications.
163+
- `emails_disabled` (Boolean, Deprecated) Disable email notifications.
164+
- `emails_enabled` (Boolean) Enable email notifications.
164165
- `environments_access_level` (String) Set the environments access level. Valid values are `disabled`, `private`, `enabled`.
165166
- `external_authorization_classification_label` (String) The classification label for the project.
166167
- `feature_flags_access_level` (String) Set the feature flags access level. Valid values are `disabled`, `private`, `enabled`.

0 commit comments

Comments
 (0)