Skip to content

Commit 42c0648

Browse files
Update docs for v17.3.0 release
1 parent 6ff98a7 commit 42c0648

10 files changed

+225
-11
lines changed

CHANGELOG.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
11

2+
## 17.3.0 (2024-08-15)
3+
4+
This release was tested against GitLab 17.3, 17.2, and 17.1 for both CE and EE
5+
6+
### IMPROVEMENTS (8 changes)
7+
8+
- **New Resource** resource/gitlab_group_security_policy_attachment: [Add new resource for association security policy projects to a group](gitlab-org/terraform-provider-gitlab@fa00e1ec7636dc47b9b4292d164825bf39af0cef) by @PatrickRice ([merge request](gitlab-org/terraform-provider-gitlab!2048))
9+
- **New Datasource** resource/gitlab_group_ids: [Add new datasource retrieving group ID, Full Path, or GraphQL ID based on group ID or Url-encoded path](gitlab-org/terraform-provider-gitlab@e0b0f88070caea6592c1983aa7792a77b27e9b88) by @PatrickRice ([merge request](gitlab-org/terraform-provider-gitlab!2057))
10+
- **New Datasource** resource/gitlab_project_ids: [Add new datasource retrieving project ID, Full Path, or GraphQL ID based on project ID or Url-encoded path](gitlab-org/terraform-provider-gitlab@e0b0f88070caea6592c1983aa7792a77b27e9b88) by @PatrickRice ([merge request](gitlab-org/terraform-provider-gitlab!2057))
11+
- resource/gitlab_project_job_token_scopes: [Add support for `target_group_ids`, allowing groups to be used in the allow list](gitlab-org/terraform-provider-gitlab@f4246b814952900a5ddfb509ca2c081d47e820e1) by @chapsuK ([merge request](gitlab-org/terraform-provider-gitlab!2040))
12+
- resource/gitlab_group: [Add support for `permanently_remove_on_delete`, allowing groups to be permanently deleted on destroy instead of entering a waiting period](gitlab-org/terraform-provider-gitlab@a0374ef9b9ff87cc9f93a1523fc3bd0998ab0c6f) by @PatrickRice ([merge request](gitlab-org/terraform-provider-gitlab!2044))
13+
- resource/gitlab_application_settings: [Add support for `max_terraform_state_size_bytes`, allowing configuration of terraform state size at an instance level](gitlab-org/terraform-provider-gitlab@d852a3360f034648816969cb3f94e310f6fb74d9) by @christian.affolter ([merge request](gitlab-org/terraform-provider-gitlab!1960))
14+
- resource/gitlab_project_push_rules: [`gitlab_project_push_rules` will now take over ownership of existing push rules, since a default set is created on project creation](gitlab-org/terraform-provider-gitlab@89e32696080ab4647d49cd077f7ffe0a5675766e) by @mness ([merge request](gitlab-org/terraform-provider-gitlab!2046))
15+
- resource/gitlab_project_job_token_scopes: [Added support for `project`, allowing the use of the resource by project ID or url-encoded path](gitlab-org/terraform-provider-gitlab@f040983bed1545fe445d41fb56e36f938cee35de) by @heidi.berry ([merge request](gitlab-org/terraform-provider-gitlab!1981))
16+
17+
### BUG FIXES (4 changes)
18+
19+
- resource/gitlab_group_access_token: [Fix example to use the proper resource](gitlab-org/terraform-provider-gitlab@f20836445c6190feb4dc081eca9f02887b39c205) by @blrz ([merge request](gitlab-org/terraform-provider-gitlab!2050))
20+
- resource/gitlab_group_security_policy_attachment: [Fix example to use the proper resource](gitlab-org/terraform-provider-gitlab@0fe493c436fb7bb333d40c8f5aab8da18f1c272c) by @calebw ([merge request](gitlab-org/terraform-provider-gitlab!2054))
21+
- resource/gitlab_project_security_policy_attachment: [Fix example to use the proper resource](gitlab-org/terraform-provider-gitlab@0fe493c436fb7bb333d40c8f5aab8da18f1c272c) by @calebw ([merge request](gitlab-org/terraform-provider-gitlab!2054))
22+
- resource/gitlab_user_runner: [Fix description to remove typo in `group_type`](gitlab-org/terraform-provider-gitlab@f67c731da1f9fcd102053c047de1455043853291) by @clemenschuaccso ([merge request](gitlab-org/terraform-provider-gitlab!2049))
23+
224
## 17.2.0 (2024-07-18)
325

426
This release was tested against GitLab 17.2, 17.1, and 17.0 for both CE and EE
@@ -12,7 +34,6 @@ Note: As a security related change, this breaking change is allowed outside a ma
1234

1335
- **New Resource** resource/gitlab_project_security_policy_attachment: [Add new resource for associating security policy projects to a project](gitlab-org/terraform-provider-gitlab@3fc5f6c8a9d74f8b034af84a73fb9dcb6d323179) by @PatrickRice ([merge request](gitlab-org/terraform-provider-gitlab!2009))
1436
- resource/gitlab_personal_access_token: [Migrate `gitlab_personal_access_token` from SDK to TF Plugin Framework](gitlab-org/terraform-provider-gitlab@24489118da1ce464994cdfcedecbe804edf65490) by @theipster ([merge request](gitlab-org/terraform-provider-gitlab!2005))
15-
-
1637

1738
### BUG FIXES (4 changes)
1839

docs/data-sources/group_ids.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_group_ids Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_group_ids data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group.
7+
Upstream API: GitLab GraphQL API docs https://docs.gitlab.com/ee/api/graphql/reference/#querygroup
8+
---
9+
10+
# gitlab_group_ids (Data Source)
11+
12+
The `gitlab_group_ids` data source identification information for a given group, allowing a user to translate a full path or ID into the GraphQL ID of the group.
13+
14+
**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#querygroup)
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "gitlab_group" "new_group" {
20+
// include required attributes
21+
}
22+
23+
// use group IDs to get additional information, such as the GraphQL ID
24+
// for other resources
25+
data "gitlab_group_ids" "foo" {
26+
group = "gitlab_group.new_group.id"
27+
}
28+
29+
output "graphQL_id" {
30+
value = data.gitlab_group_ids.foo.group_graphql_id
31+
}
32+
```
33+
34+
<!-- schema generated by tfplugindocs -->
35+
## Schema
36+
37+
### Required
38+
39+
- `group` (String) The ID or URL-encoded path of the group.
40+
41+
### Read-Only
42+
43+
- `group_full_path` (String) The full path of the group.
44+
- `group_graphql_id` (String) The GraphQL ID of the group.
45+
- `group_id` (String) The ID of the group.
46+
- `id` (String) The ID of this Terraform resource. In the format of `<group_id>`.

docs/data-sources/project_ids.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_project_ids Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_project_ids data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project.
7+
Upstream API: GitLab GraphQL API docs https://docs.gitlab.com/ee/api/graphql/reference/#queryproject
8+
---
9+
10+
# gitlab_project_ids (Data Source)
11+
12+
The `gitlab_project_ids` data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project.
13+
14+
**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#queryproject)
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "gitlab_project" "new_project" {
20+
// include required attributes
21+
}
22+
23+
// use project IDs to get additional information, such as the GraphQL ID
24+
// for other resources
25+
data "gitlab_project_ids" "foo" {
26+
project = "gitlab_project.new_project.id"
27+
}
28+
29+
output "graphQL_id" {
30+
value = data.gitlab_project_ids.foo.project_graphql_id
31+
}
32+
```
33+
34+
<!-- schema generated by tfplugindocs -->
35+
## Schema
36+
37+
### Required
38+
39+
- `project` (String) The ID or URL-encoded path of the project.
40+
41+
### Read-Only
42+
43+
- `id` (String) The ID of this Terraform resource. In the format of `<project_id>`.
44+
- `project_full_path` (String) The full path of the project.
45+
- `project_graphql_id` (String) The GraphQL ID of the project.
46+
- `project_id` (String) The ID of the project.

docs/resources/application_settings.md

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ resource "gitlab_application_settings" "this" {
189189
- `max_pages_size` (Number) Maximum size of pages repositories in MB.
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.
192+
- `max_terraform_state_size_bytes` (Number) Maximum size in bytes of the Terraform state files. Set this to 0 for unlimited file size.
192193
- `metrics_method_call_threshold` (Number) A method call is only tracked when it takes longer than the given amount of milliseconds.
193194
- `minimum_password_length` (Number) Indicates whether passwords require a minimum length. Introduced in GitLab 15.1. Premium and Ultimate only.
194195
- `mirror_available` (Boolean) Allow repository mirroring to configured by project Maintainers. If disabled, only Administrators can configure repository mirroring.

docs/resources/group.md

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ resource "gitlab_group" "example-two" {
6969
- `membership_lock` (Boolean) Users cannot be added to projects in this group.
7070
- `mentions_disabled` (Boolean) Disable the capability of a group from getting mentioned.
7171
- `parent_id` (Number) Id of the parent group (creates a nested group).
72+
- `permanently_remove_on_delete` (Boolean) Whether the group should be permanently removed during a `delete` operation. This only works with subgroups. Must be configured via an `apply` before the `destroy` is run.
7273
- `prevent_forking_outside_group` (Boolean) Defaults to false. When enabled, users can not fork projects from this group to external namespaces.
7374
- `project_creation_level` (String) Determine if developers can create projects in the group. Valid values are: `noone`, `maintainer`, `developer`
7475
- `push_rules` (Block List, Max: 1) Push rules for the group. (see [below for nested schema](#nestedblock--push_rules))

docs/resources/group_access_token.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The `gitlab_group_access_token` resource allows to manage the lifecycle of a gro
2727
```terraform
2828
resource "gitlab_group_access_token" "example" {
2929
group = "25"
30-
name = "Example project access token"
30+
name = "Example group access token"
3131
expires_at = "2020-03-14"
3232
access_level = "developer"
3333
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_group_security_policy_attachment Resource - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_group_security_policy_attachment resource allows to attach a security policy project to a group.
7+
Upstream API: GitLab GraphQL API docs https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign
8+
---
9+
10+
# gitlab_group_security_policy_attachment (Resource)
11+
12+
The `gitlab_group_security_policy_attachment` resource allows to attach a security policy project to a group.
13+
14+
**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/index.html#mutationsecuritypolicyprojectassign)
15+
16+
## Example Usage
17+
18+
```terraform
19+
# This resource can be used to attach a security policy to a pre-existing group
20+
resource "gitlab_group_security_policy_attachment" "foo" {
21+
group = 1234
22+
policy_project = 4567
23+
}
24+
25+
26+
# Or you can use Terraform to create a new project, add a policy to that project,
27+
# then attach that policy project to other groups.
28+
resource "gitlab_project" "my-policy-project" {
29+
name = "security-policy-project"
30+
}
31+
32+
resource "gitlab_repository_file" "policy-yml" {
33+
project = gitlab_project.my-policy-project.id
34+
file_path = ".gitlab/security-policies/my-policy.yml"
35+
branch = "master"
36+
encoding = "text"
37+
content = <<-EOT
38+
---
39+
approval_policy:
40+
- name: test
41+
description: test
42+
enabled: true
43+
rules:
44+
- type: any_merge_request
45+
branch_type: protected
46+
commits: any
47+
approval_settings:
48+
block_branch_modification: true
49+
prevent_pushing_and_force_pushing: true
50+
prevent_approval_by_author: true
51+
prevent_approval_by_commit_author: true
52+
remove_approvals_with_new_commit: true
53+
require_password_to_approve: false
54+
fallback_behavior:
55+
fail: closed
56+
actions:
57+
- type: send_bot_message
58+
enabled: true
59+
EOT
60+
}
61+
62+
resource "gitlab_group_security_policy_attachment" "my-policy" {
63+
group = 1234
64+
policy_project = gitlab_project.my-policy-project.id
65+
}
66+
```
67+
68+
<!-- schema generated by tfplugindocs -->
69+
## Schema
70+
71+
### Required
72+
73+
- `group` (String) The ID or Full Path of the group which will have the security policy project assigned to it.
74+
- `policy_project` (String) The ID or Full Path of the security policy project.
75+
76+
### Read-Only
77+
78+
- `group_graphql_id` (String) The GraphQL ID of the group to which the security policty project will be attached.
79+
- `id` (String) The ID of this Terraform resource. In the format of `<group>:<policy_project>`.
80+
- `policy_project_graphql_id` (String) The GraphQL ID of the security policy project.
81+
82+
## Import
83+
84+
Import is supported using the following syntax:
85+
86+
```shell
87+
# GitLab group security policy attachments can be imported using an id made up of `group:policy_project_id` where the policy project ID is the project ID of the policy project, e.g.
88+
terraform import gitlab_group_security_policy_attachment.foo 1:2
89+
```

docs/resources/project_job_token_scopes.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,36 @@ Any project not within the defined set in this attribute will be removed, which
2222

2323
```terraform
2424
resource "gitlab_project_job_token_scopes" "allowed_single_project" {
25-
project_id = 111
25+
project = "111"
2626
target_project_ids = [123]
2727
}
2828
2929
resource "gitlab_project_job_token_scopes" "allowed_multiple_project" {
30-
project_id = 111
30+
project = "111"
3131
target_project_ids = [123, 456, 789]
3232
}
3333
34+
resource "gitlab_project_job_token_scopes" "allowed_multiple_groups" {
35+
project_id = 111
36+
target_project_ids = []
37+
target_group_ids = [321, 654]
38+
}
39+
3440
# This will remove all job token scopes, even if added outside of TF.
3541
resource "gitlab_project_job_token_scopes" "explicit_deny" {
36-
project_id = 111
42+
project = "111"
3743
target_project_ids = []
3844
}
3945
```
4046

4147
<!-- schema generated by tfplugindocs -->
4248
## Schema
4349

44-
### Required
50+
### Optional
4551

46-
- `project_id` (Number) The ID of the project.
52+
- `project` (String) The ID or full path of the project.
53+
- `project_id` (Number, Deprecated) The ID of the project.
54+
- `target_group_ids` (Set of Number) A set of group IDs that are in the CI/CD job token inbound allowlist.
4755
- `target_project_ids` (Set of Number) A set of project IDs that are in the CI/CD job token inbound allowlist.
4856

4957
### Read-Only
@@ -55,6 +63,6 @@ resource "gitlab_project_job_token_scopes" "explicit_deny" {
5563
Import is supported using the following syntax:
5664

5765
```shell
58-
# GitLab project job token scopes can be imported using an id made up of just the `project_id` as an integer
66+
# GitLab project job token scopes can be imported using an id made up of just the `project_id`
5967
terraform import gitlab_project_job_token_scopes.bar 123
6068
```

docs/resources/project_push_rules.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ subcategory: ""
55
description: |-
66
The gitlab_project_push_rules resource allows to manage the lifecycle of push rules on a project.
77
~> This resource will compete with the gitlab_project resource if push rules are also defined as
8-
part of that resource. It is recommended to define push rules using this resource OR in the gitlab_project resource,
8+
part of that resource, since this resource will take over ownership of the project push rules created for the referenced project.
9+
It is recommended to define push rules using this resource OR in the gitlab_project resource,
910
but not in both as it may result in terraform identifying changes with every "plan" operation.
1011
-> This resource requires a GitLab Enterprise instance with a Premium license to set the push rules on a project.
1112
Upstream API: GitLab API docs https://docs.gitlab.com/ee/api/projects.html#push-rules
@@ -16,7 +17,8 @@ description: |-
1617
The `gitlab_project_push_rules` resource allows to manage the lifecycle of push rules on a project.
1718

1819
~> This resource will compete with the `gitlab_project` resource if push rules are also defined as
19-
part of that resource. It is recommended to define push rules using this resource OR in the `gitlab_project` resource,
20+
part of that resource, since this resource will take over ownership of the project push rules created for the referenced project.
21+
It is recommended to define push rules using this resource OR in the `gitlab_project` resource,
2022
but not in both as it may result in terraform identifying changes with every "plan" operation.
2123

2224
-> This resource requires a GitLab Enterprise instance with a Premium license to set the push rules on a project.

docs/resources/project_security_policy_attachment.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ actions:
5959
EOT
6060
}
6161
62-
resource "gitlab_project_security_policy" "my-policy" {
62+
resource "gitlab_project_security_policy_attachment" "my-policy" {
6363
project = 1234
6464
policy_project = gitlab_project.my-policy-project.id
6565
}

0 commit comments

Comments
 (0)