Skip to content

Commit 6e47f04

Browse files
Update docs for v16.2.0 release
1 parent a24f09b commit 6e47f04

11 files changed

+195
-8
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## 16.2.0 (2023-07-22)
2+
3+
This release was tested against GitLab 15.11, 16.0 and 16.1 for both CE and EE.
4+
5+
IMPROVEMENTS:
6+
7+
- **New Resource:** `gitlab_project_compliance_framework` ([!1616](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1616))
8+
- **New Resource:** `gitlab_compliance_framework` ([!1599](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1599))
9+
- resource/gitlab_group_badge: Improve examples to contain common badges ([!1627](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1627))
10+
- resource/branch_protection: Add support for `admin` as a value for `unprotect_access_level` ([!1626](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1626))
11+
- datasource/gitlab_groups: Add `top_level_only` support ([!1606](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1606))
12+
- datasource/gitlab_project: Add `topic` support ([!1610](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1610))
13+
14+
BUG FIXES:
15+
16+
- resource/gitlab_application_settings: Fix documentation to list the correct `import_sources` ([!1638](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1638))
17+
- resource/gitlab_project: Previously, `name_regex_delete` was improperly deprecated. Remove deprecation notice, and add notice to `name_regex`, which is the proper field ([!1600](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1600))
18+
- resource/gitlab_repository_file: Fix an issue where updating a repository file when using the `text` encoding returned a base64 encoding error ([!1642](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1642))
19+
120
## 16.1.1 (2023-07-17)
221

322
This release was tested against GitLab 15.11, 16.0 and 16.1 for both CE and EE.

docs/data-sources/groups.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ data "gitlab_groups" "example-two" {
4040
- `order_by` (String) Order the groups' list by `id`, `name`, `path`, or `similarity`. (Requires administrator privileges)
4141
- `search` (String) Search groups by name or path.
4242
- `sort` (String) Sort groups' list in asc or desc order. (Requires administrator privileges)
43+
- `top_level_only` (Boolean) Limit to top level groups, excluding all subgroups.
4344

4445
### Read-Only
4546

docs/data-sources/projects.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ data "gitlab_projects" "projects" {
6161
- `sort` (String) Return projects sorted in `asc` or `desc` order. Default is `desc`.
6262
- `starred` (Boolean) Limit by projects starred by the current user.
6363
- `statistics` (Boolean) Include project statistics. Cannot be used with `group_id`.
64+
- `topic` (Set of String) Limit by projects that have all of the given topics.
6465
- `visibility` (String) Limit by visibility `public`, `internal`, or `private`.
6566
- `with_custom_attributes` (Boolean) Include custom attributes in response _(admins only)_.
6667
- `with_issues_enabled` (Boolean) Limit by projects with issues feature enabled. Default is `false`.

docs/data-sources/repository_file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ data "gitlab_repository_file" "example" {
3636

3737
- `blob_id` (String) The blob id.
3838
- `commit_id` (String) The commit id.
39-
- `content` (String) File content. If the content is not yet base64 encoded, it will be encoded automatically. No other encoding is currently supported, because of a [GitLab API bug](https://gitlab.com/gitlab-org/gitlab/-/issues/342430).
39+
- `content` (String) File content.
4040
- `content_sha256` (String) File content sha256 digest.
4141
- `encoding` (String) The file content encoding.
4242
- `execute_filemode` (Boolean) Enables or disables the execute flag on the file. **Note**: requires GitLab 14.10 or newer.

docs/resources/application_settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ resource "gitlab_application_settings" "this" {
166166
- `housekeeping_gc_period` (Number) Number of Git pushes after which git gc is run.
167167
- `housekeeping_incremental_repack_period` (Number) Number of Git pushes after which an incremental git repack is run.
168168
- `html_emails_enabled` (Boolean) Enable HTML emails.
169-
- `import_sources` (List of String) Sources to allow project import from, possible values: github, bitbucket, bitbucket_server, gitlab, fogbugz, git, gitlab_project, gitea, manifest, and phabricator.
169+
- `import_sources` (List of String) Sources to allow project import from. Valid values are: `github`, `bitbucket`, `bitbucket_server`, `fogbugz`, `git`, `gitlab_project`, `gitea`, `manifest`
170170
- `in_product_marketing_emails_enabled` (Boolean) Enable in-product marketing emails.
171171
- `inactive_projects_delete_after_months` (Number) If delete_inactive_projects is true, the time (in months) to wait before deleting inactive projects. Introduced in GitLab 14.10. Became operational in GitLab 15.0.
172172
- `inactive_projects_min_size_mb` (Number) If delete_inactive_projects is true, the minimum repository size for projects to be checked for inactivity. Introduced in GitLab 14.10. Became operational in GitLab 15.0.

docs/resources/branch_protection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ resource "gitlab_branch_protection" "main" {
9696
- `code_owner_approval_required` (Boolean) Can be set to true to require code owner approval before merging. Only available own 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`.
99-
- `unprotect_access_level` (String) Access levels allowed to unprotect. Valid values are: `developer`, `maintainer`.
99+
- `unprotect_access_level` (String) Access levels allowed to unprotect. Valid values are: `developer`, `maintainer`, `admin`.
100100

101101
### Read-Only
102102

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_compliance_framework Resource - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_compliance_framework resource allows to manage the lifecycle of a compliance framework on top-level groups.
7+
There can be only one default compliance framework. Of all the configured compliance frameworks marked as default, the last one applied will be the default compliance framework.
8+
-> This resource requires a GitLab Enterprise instance with a Premium license to create the compliance framework.
9+
-> This resource requires a GitLab Enterprise instance with an Ultimate license to specify a compliance pipeline configuration in the compliance framework.
10+
Upstream API: GitLab GraphQL API docs https://docs.gitlab.com/ee/api/graphql/reference/#mutationcreatecomplianceframework
11+
---
12+
13+
# gitlab_compliance_framework (Resource)
14+
15+
The `gitlab_compliance_framework` resource allows to manage the lifecycle of a compliance framework on top-level groups.
16+
17+
There can be only one `default` compliance framework. Of all the configured compliance frameworks marked as default, the last one applied will be the default compliance framework.
18+
19+
-> This resource requires a GitLab Enterprise instance with a Premium license to create the compliance framework.
20+
21+
-> This resource requires a GitLab Enterprise instance with an Ultimate license to specify a compliance pipeline configuration in the compliance framework.
22+
23+
**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcreatecomplianceframework)
24+
25+
## Example Usage
26+
27+
```terraform
28+
resource "gitlab_compliance_framework" "sample" {
29+
namespace_path = "top-level-group"
30+
name = "HIPAA"
31+
description = "A HIPAA Compliance Framework"
32+
color = "#87BEEF"
33+
default = false
34+
pipeline_configuration_full_path = ".hipaa.yml@top-level-group/compliance-frameworks"
35+
}
36+
```
37+
38+
<!-- schema generated by tfplugindocs -->
39+
## Schema
40+
41+
### Required
42+
43+
- `color` (String) New color representation of the compliance framework in hex format. e.g. #FCA121.
44+
- `description` (String) Description for the compliance framework.
45+
- `name` (String) Name for the compliance framework.
46+
- `namespace_path` (String) Full path of the namespace to add the compliance framework to.
47+
48+
### Optional
49+
50+
- `default` (Boolean) Set this compliance framework as the default framework for the group. Default: `false`
51+
- `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`. Required format: `path/file.y[a]ml@group-name/project-name` **Note**: Ultimate license required.
52+
53+
### Read-Only
54+
55+
- `framework_id` (String) Globally unique ID of the compliance framework.
56+
- `id` (String) The ID of this Terraform resource. In the format of `<namespace_path>:<framework_id>`.
57+
58+
## Import
59+
60+
Import is supported using the following syntax:
61+
62+
```shell
63+
# Gitlab compliance frameworks can be imported with a key composed of `<namespace_path>:<framework_id>`, e.g.
64+
terraform import gitlab_compliance_framework.sample "top-level-group:gid://gitlab/ComplianceManagement::Framework/12345"
65+
```

docs/resources/group_badge.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
page_title: "gitlab_group_badge Resource - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
The gitlab_group_badge resource allows to mange the lifecycle of group badges.
6+
The gitlab_group_badge resource allows to manage the lifecycle of group badges.
77
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/user/project/badges.html#group-badges
88
---
99

1010
# gitlab_group_badge (Resource)
1111

12-
The `gitlab_group_badge` resource allows to mange the lifecycle of group badges.
12+
The `gitlab_group_badge` resource allows to manage the lifecycle of group badges.
1313

1414
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#group-badges)
1515

@@ -25,6 +25,27 @@ resource "gitlab_group_badge" "example" {
2525
link_url = "https://example.com/badge-123"
2626
image_url = "https://example.com/badge-123.svg"
2727
}
28+
29+
# Pipeline status badges with placeholders will be enabled for each project
30+
resource "gitlab_group_badge" "gitlab_pipeline" {
31+
group = gitlab_group.foo.id
32+
link_url = "https://gitlab.example.com/%%{project_path}/-/pipelines?ref=%%{default_branch}"
33+
image_url = "https://gitlab.example.com/%%{project_path}/badges/%%{default_branch}/pipeline.svg"
34+
}
35+
36+
# Test coverage report badges with placeholders will be enabled for each project
37+
resource "gitlab_group_badge" "gitlab_coverage" {
38+
group = gitlab_group.foo.id
39+
link_url = "https://gitlab.example.com/%%{project_path}/-/jobs"
40+
image_url = "https://gitlab.example.com/%%{project_path}/badges/%%{default_branch}/coverage.svg"
41+
}
42+
43+
# Latest release badges with placeholders will be enabled for each project
44+
resource "gitlab_group_badge" "gitlab_release" {
45+
group = gitlab_group.foo.id
46+
link_url = "https://gitlab.example.com/%%{project_path}/-/releases"
47+
image_url = "https://gitlab.example.com/%%{project_path}/-/badges/release.svg"
48+
}
2849
```
2950

3051
<!-- schema generated by tfplugindocs -->

docs/resources/project_badge.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
page_title: "gitlab_project_badge Resource - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
The gitlab_project_badge resource allows to mange the lifecycle of project badges.
6+
The gitlab_project_badge resource allows to manage the lifecycle of project badges.
77
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/user/project/badges.html#project-badges
88
---
99

1010
# gitlab_project_badge (Resource)
1111

12-
The `gitlab_project_badge` resource allows to mange the lifecycle of project badges.
12+
The `gitlab_project_badge` resource allows to manage the lifecycle of project badges.
1313

1414
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/user/project/badges.html#project-badges)
1515

@@ -26,6 +26,30 @@ resource "gitlab_project_badge" "example" {
2626
image_url = "https://example.com/badge-123.svg"
2727
name = "badge-123"
2828
}
29+
30+
# Pipeline status badges with placeholders will be enabled
31+
resource "gitlab_project_badge" "gitlab_pipeline" {
32+
project = gitlab_project.foo.id
33+
link_url = "https://gitlab.example.com/%%{project_path}/-/pipelines?ref=%%{default_branch}"
34+
image_url = "https://gitlab.example.com/%%{project_path}/badges/%%{default_branch}/pipeline.svg"
35+
name = "badge-pipeline"
36+
}
37+
38+
# Test coverage report badges with placeholders will be enabled
39+
resource "gitlab_project_badge" "gitlab_coverage" {
40+
project = gitlab_project.foo.id
41+
link_url = "https://gitlab.example.com/%%{project_path}/-/jobs"
42+
image_url = "https://gitlab.example.com/%%{project_path}/badges/%%{default_branch}/coverage.svg"
43+
name = "badge-coverage"
44+
}
45+
46+
# Latest release badges with placeholders will be enabled
47+
resource "gitlab_project_badge" "gitlab_release" {
48+
project = gitlab_project.foo.id
49+
link_url = "https://gitlab.example.com/%%{project_path}/-/releases"
50+
image_url = "https://gitlab.example.com/%%{project_path}/-/badges/release.svg"
51+
name = "badge-release"
52+
}
2953
```
3054

3155
<!-- schema generated by tfplugindocs -->
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_project_compliance_framework Resource - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_project_compliance_framework resource allows to manage the lifecycle of a compliance framework on a project.
7+
-> This resource requires a GitLab Enterprise instance with a Premium license to set the compliance framework on a project.
8+
Upstream API: GitLab GraphQL API docs https://docs.gitlab.com/ee/api/graphql/reference/#mutationprojectsetcomplianceframework
9+
---
10+
11+
# gitlab_project_compliance_framework (Resource)
12+
13+
The `gitlab_project_compliance_framework` resource allows to manage the lifecycle of a compliance framework on a project.
14+
15+
-> This resource requires a GitLab Enterprise instance with a Premium license to set the compliance framework on a project.
16+
17+
**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationprojectsetcomplianceframework)
18+
19+
## Example Usage
20+
21+
```terraform
22+
resource "gitlab_compliance_framework" "sample" {
23+
namespace_path = "top-level-group"
24+
name = "HIPAA"
25+
description = "A HIPAA Compliance Framework"
26+
color = "#87BEEF"
27+
default = false
28+
pipeline_configuration_full_path = ".hipaa.yml@top-level-group/compliance-frameworks"
29+
}
30+
31+
resource "gitlab_project_compliance_framework" "sample" {
32+
compliance_framework_id = gitlab_compliance_framework.sample.framework_id
33+
project = "12345678"
34+
}
35+
```
36+
37+
<!-- schema generated by tfplugindocs -->
38+
## Schema
39+
40+
### Required
41+
42+
- `compliance_framework_id` (String) Globally unique ID of the compliance framework to assign to the project.
43+
- `project` (String) The ID or full path of the project to change the compliance framework of.
44+
45+
### Read-Only
46+
47+
- `id` (String) The ID of this Terraform resource.
48+
49+
## Import
50+
51+
Import is supported using the following syntax:
52+
53+
```shell
54+
# Gitlab project compliance frameworks can be imported with a key composed of `<project_id>`, e.g.
55+
terraform import gitlab_project_compliance_framework.sample "42"
56+
```

0 commit comments

Comments
 (0)