Skip to content

Commit 5280dd4

Browse files
Update docs for v17.6.1 release
1 parent 6059470 commit 5280dd4

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

Diff for: CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## 17.6.1 (2024-11-27)
2+
3+
This release was tested against GitLab 17.6, 17.5, and 17.4 for both CE and EE
4+
5+
### IMPROVEMENTS (1 change)
6+
7+
- resource/gitlab_group_service_account_token: [Add support for `rotation_configuration` with a limited set of attributes](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/7bad2a4bf0fd6e777c2d3598b35d46bc287135fc) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2206))
8+
9+
### BUG FIXES (2 changes)
10+
11+
- resource/gitlab_project_compliance_frameworks: [Fixed an issue where project compliance frameworks didn't delete compliance frameworks properly. Fixed a bug where compliance frameworks weren't set properly on a project where they were removed outside of TF](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/6fe104b21bf5f07aff62b9751fa3d2d66c5ba175) by @mness ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2214))
12+
- resource/gitlab_group: [Fixed an issue where an `allowed_email_domain_list` added outside of TF would be unset when upgrading the provider to 17.6](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/4b76021b5a0633054eccb5e0b24435cf8dd64a8c) by @PatrickRice ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2217))
13+
114
## 17.6.0 (2024-11-21)
215

316
This release was tested against GitLab 17.6, 17.5, and 17.4 for both CE and EE

Diff for: docs/resources/group_service_account_access_token.md

+28-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ description: |-
66
The gitlab_group_service_account_access_token resource allows to manage the lifecycle of a group service account access token.
77
~> 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.
88
~> Reading the access token status of a service account requires an admin token or a top-level group owner token on gitlab.com. As a result, this resource will ignore permission errors when attempting to read the token status, and will rely on the values in state instead. This can lead to apply-time failures if the token configured for the provider doesn't have permissions to rotate tokens for the service account.
9+
~> 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.
10+
~> Due to a limitation in the API, the rotation_configuration is unable to set the new expiry date. Instead, when the resource is created, it will default the expiry date to 7 days in the future. On each subsequent apply, the new expiry will be 7 days from the date of the apply.
911
Upstream API: GitLab API docs https://docs.gitlab.com/ee/api/group_service_accounts.html#create-a-personal-access-token-for-a-service-account-user
1012
---
1113

@@ -17,6 +19,10 @@ The `gitlab_group_service_account_access_token` resource allows to manage the li
1719

1820
~> Reading the access token status of a service account requires an admin token or a top-level group owner token on gitlab.com. As a result, this resource will ignore permission errors when attempting to read the token status, and will rely on the values in state instead. This can lead to apply-time failures if the token configured for the provider doesn't have permissions to rotate tokens for the service account.
1921

22+
~> 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.
23+
24+
~> Due to a limitation in the API, the `rotation_configuration` is unable to set the new expiry date. Instead, when the resource is created, it will default the expiry date to 7 days in the future. On each subsequent apply, the new expiry will be 7 days from the date of the apply.
25+
2026
**Upstream API**: [GitLab API docs](https://docs.gitlab.com/ee/api/group_service_accounts.html#create-a-personal-access-token-for-a-service-account-user)
2127

2228
## Example Usage
@@ -53,6 +59,19 @@ resource "gitlab_group_service_account_access_token" "example_sa_token" {
5359
5460
scopes = ["api"]
5561
}
62+
63+
# The service account access token with rotation configuration
64+
resource "gitlab_group_service_account_access_token" "example_sa_token" {
65+
group = gitlab_group.example.id
66+
user_id = gitlab_group_service_account.example_sa.service_account_id
67+
name = "Example service account access token"
68+
69+
rotation_configuration = {
70+
rotate_before_days = 2
71+
}
72+
73+
scopes = ["api"]
74+
}
5675
```
5776

5877
<!-- schema generated by tfplugindocs -->
@@ -67,7 +86,8 @@ resource "gitlab_group_service_account_access_token" "example_sa_token" {
6786

6887
### Optional
6988

70-
- `expires_at` (String) The personal access token expiry date. When left blank, the token follows the standard rule of expiry for personal access tokens.
89+
- `expires_at` (String) The service account access token expiry date. When left blank, the token follows the standard rule of expiry for personal access tokens.
90+
- `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))
7191

7292
### Read-Only
7393

@@ -77,6 +97,13 @@ resource "gitlab_group_service_account_access_token" "example_sa_token" {
7797
- `revoked` (Boolean) True if the token is revoked.
7898
- `token` (String, Sensitive) The token of the group service account access token. **Note**: the token is not available for imported resources.
7999

100+
<a id="nestedatt--rotation_configuration"></a>
101+
### Nested Schema for `rotation_configuration`
102+
103+
Required:
104+
105+
- `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.
106+
80107
## Import
81108

82109
Starting in Terraform v1.5.0 you can use an [import block](https://developer.hashicorp.com/terraform/language/import) to import `gitlab_group_service_account_access_token`. For example:

0 commit comments

Comments
 (0)