Skip to content

Commit 42caec0

Browse files
Update docs for v16.0.0 release
1 parent 1ad6952 commit 42caec0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+785
-36
lines changed

CHANGELOG.md

+51
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
1+
## 16.0.0 (2023-05-22)
2+
3+
- This release was tested against GitLab 15.10, 15.11 and 16.0 for both CE and EE.
4+
- **Note:** this is a major release and breaks some interfaces in resources and data sources of
5+
this provider, but also drops support for older GitLab versions.
6+
7+
BREAKING CHANGES:
8+
9+
See [Terraform GitLab Provider Version 16.0 Upgrade Guide](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/guides/version-16.0-upgrade) for details.
10+
11+
BREAKING CHANGES:
12+
13+
- resource/gitlab_instance_variable: Change `value` attribute to non-sensitive ([!1521](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1521))
14+
- resource/gitlab_group_variable: Change `value` attribute to non-sensitive ([!1521](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1521))
15+
- resource/gitlab_project_variable: Change `value` attribute to non-sensitive ([!1521](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1521))
16+
- resource/gitlab_deploy_token: Change resource id format to `<token-type>:<type-id>:<token-id>` ([!1523](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1523))
17+
- resource/gitlab_deploy_key: Change resource id format to `<project>:<key-id>` ([!1522](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1522))
18+
- resource/gitlab_project_hook: Change resource id format to `<project>:<hook-id>` ([!1483](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1483))
19+
- resource/gitlab_group_label: Change resource id format to `<group>:<label-name>` ([!1525](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1525))
20+
- resource/gitlab_label: Rename resource to `gitlab_project_label` ([!1526](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1526))
21+
- resource/gitlab_project_label: Change resource id format to `<project>:<label-name>` ([!1526](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1526))
22+
- resource/gitlab_managed_license: Remove resource ([!1512](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1512))
23+
- resource/gitlab_pipeline_schedule_variable: Change resource id format to `<project>:<schedule-id>:<variable-id>` ([!1529](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1529))
24+
- resource/gitlab_repository_file: Remove support for auto-encoding logic ([!1530](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1530))
25+
- resource/gitlab_group_ldap_link: Change resource id format to `<group>:<provider>:[cn]:[filter]` ([!1527](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1527))
26+
- resource/gitlab_group_ldap_link: Rename `group_id` attribute to `group` ([!1532](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1532))
27+
- resource/gitlab_service_*: Rename `gitlab_service_*` resources to `gitlab_integration_*` ([!1534](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1534))
28+
- resource/gitlab_project: Remove `operations_access_level` ([!1548](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1548))
29+
- datasource/gitlab_project: Remove `operations_access_level` ([!1548](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1548))
30+
- datasource/gitlab_projects: Remove `operations_access_level` ([!1548](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1548))
31+
- resource/gitlab_pipeline_trigger: Change resource id format to `<project>:<trigger-id>` ([!1551](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1551))
32+
- resource/gitlab_pipeline_schedule: Change resource id format to `<project>:<schedule-id>` ([!1551](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1551))
33+
- resource/gitlab_project_freeze_period: Change `project_id` attribute to `project` ([!1553](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1553))
34+
- resource/gitlab_project_level_mr_approvals: Change `project_id` attribute to `project` ([!1553](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1553))
35+
- resource/gitlab_project_membership: Change `project_id` attribute to `project` ([!1553](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1553))
36+
- resource/gitlab_project_share_group: Change `project_id` attribute to `project` ([!1553](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1553))
37+
- resource/gitlab_project_access_token: Require `expires_at` attribute ([!1557](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1557))
38+
39+
FEATURES:
40+
41+
- resource/gitlab_instance_variable: Support `raw` attribute ([!1533](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1533))
42+
- resource/gitlab_group_variable: Support `raw` attribute ([!1533](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1533))
43+
- resource/gitlab_project_variable: Support `raw` attribute ([!1533](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1533))
44+
- datasource/gitlab_instance_variable: Support `raw` attribute ([!1533](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1533))
45+
- datasource/gitlab_group_variable: Support `raw` attribute ([!1533](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1533))
46+
- datasource/gitlab_project_variable: Support `raw` attribute ([!1533](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1533))
47+
48+
IMPROVEMENTS:
49+
50+
- resource/gitlab_project_environment: Wait for environment to stop before deleting it ([!1509](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/1509))
51+
152
## 15.11.0 (2023-04-22)
253

354
This release was tested against GitLab 15.9, 15.10 and 15.11 for both CE and EE.

docs/data-sources/group_variable.md

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ data "gitlab_group_variable" "bar" {
4646
- `id` (String) The ID of this resource.
4747
- `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`.
4848
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
49+
- `raw` (Boolean) Whether the variable is treated as a raw string. Default: false. When true, variables in the value are not expanded.
4950
- `value` (String) The value of the variable.
5051
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
5152

docs/data-sources/group_variables.md

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Read-Only:
5353
- `key` (String)
5454
- `masked` (Boolean)
5555
- `protected` (Boolean)
56+
- `raw` (Boolean)
5657
- `value` (String)
5758
- `variable_type` (String)
5859

docs/data-sources/instance_variable.md

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ data "gitlab_instance_variable" "foo" {
3333
- `id` (String) The ID of this resource.
3434
- `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`.
3535
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
36+
- `raw` (Boolean) Whether the variable is treated as a raw string. Default: false. When true, variables in the value are not expanded.
3637
- `value` (String) The value of the variable.
3738
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
3839

docs/data-sources/instance_variables.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Read-Only:
3535
- `key` (String)
3636
- `masked` (Boolean)
3737
- `protected` (Boolean)
38+
- `raw` (Boolean)
3839
- `value` (String)
3940
- `variable_type` (String)
4041

docs/data-sources/project.md

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ data "gitlab_project" "example" {
7474
- `monitor_access_level` (String) Set the monitor access level. Valid values are `disabled`, `private`, `enabled`.
7575
- `name` (String) The name of the project.
7676
- `namespace_id` (Number) The namespace (group or user) of the project. Defaults to your user.
77-
- `operations_access_level` (String) Set the operations access level. Valid values are `disabled`, `private`, `enabled`.
7877
- `path` (String) The path of the repository.
7978
- `pipelines_enabled` (Boolean) Enable pipelines for the project.
8079
- `printing_merge_request_link_enabled` (Boolean) Show link to create/view merge request when pushing from the command line

docs/data-sources/project_issue.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ The `gitlab_project_issue` data source allows to retrieve details about an issue
1616
## Example Usage
1717

1818
```terraform
19-
data "gitlab_project" "foo" {
20-
id = "foo/bar/baz"
21-
}
22-
23-
data "gitlab_project_issue" "welcome_issue" {
24-
project = data.gitlab_project.foo.id
25-
iid = 1
26-
}
27-
28-
output "welcome_issue_web_url" {
29-
value = data.gitlab_project_issue.web_url
19+
data "gitlab_project" "foo" {
20+
path_with_namespace = "foo/bar/baz"
21+
}
22+
23+
data "gitlab_project_issue" "welcome_issue" {
24+
project = data.gitlab_project.foo.id
25+
iid = 1
26+
}
27+
28+
output "welcome_issue_web_url" {
29+
value = data.gitlab_project_issue.web_url
3030
}
3131
```
3232

docs/data-sources/project_variable.md

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ data "gitlab_project_variable" "bar" {
4646
- `id` (String) The ID of this resource.
4747
- `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`.
4848
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
49+
- `raw` (Boolean) Whether the variable is treated as a raw string. Default: false. When true, variables in the value are not expanded.
4950
- `value` (String) The value of the variable.
5051
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
5152

docs/data-sources/project_variables.md

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Read-Only:
5353
- `masked` (Boolean)
5454
- `project` (String)
5555
- `protected` (Boolean)
56+
- `raw` (Boolean)
5657
- `value` (String)
5758
- `variable_type` (String)
5859

docs/data-sources/projects.md

-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ Read-Only:
140140
- `only_allow_merge_if_pipeline_succeeds` (Boolean)
141141
- `only_mirror_protected_branches` (Boolean)
142142
- `open_issues_count` (Number)
143-
- `operations_access_level` (String)
144143
- `owner` (List of Object) (see [below for nested schema](#nestedobjatt--projects--owner))
145144
- `packages_enabled` (Boolean)
146145
- `path` (String)

docs/guides/version-15.7-upgrade.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ the release cadence and versioning has been
1111
starting with 15.7 (22nd Dec 2022).
1212

1313
The version bump from [`3.20.0`](https://registry.terraform.io/providers/gitlabhq/gitlab/3.20.0) to
14-
[`v15.7.0`](https://registry.terraform.io/providers/gitlabhq/gitlab/15.7.0) introduced a few breaking changes,
14+
[`15.7.0`](https://registry.terraform.io/providers/gitlabhq/gitlab/15.7.0) introduced a few breaking changes,
1515
which are described below.
1616

1717

docs/guides/version-16.0-upgrade.md

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
page_title: "Terraform GitLab Provider Version 16.0 Upgrade Guide"
3+
---
4+
5+
# Upgrade to Terraform GitLab Provider Version 16.0
6+
7+
The GitLab 16.0 major milestone introduced a couple of breaking changes that this
8+
release addresses. In addition, the provider itself breaks a bunch of interfaces
9+
which may require actions on the users side. These are described below:
10+
11+
## Change of resource id formats
12+
13+
**Affected resources**:
14+
15+
- `gitlab_deploy_token`
16+
- `gitlab_deploy_key`
17+
- `gitlab_project_hook`
18+
- `gitlab_group_label`
19+
- `gitlab_project_label`
20+
- `gitlab_pipeline_schedule_variable`
21+
- `gitlab_group_ldap_link`
22+
- `gitlab_pipeline_trigger`
23+
- `gitlab_pipeline_schedule`
24+
25+
Some resource `id` formats weren't uniquly identifiable and didn't contain
26+
all the information to retrive a particular resource from the GitLab API
27+
given this id.
28+
29+
Therefore, you may need to change your `terraform import` commands to use fully
30+
identifiable resource ids as described in the repsective docs.
31+
This may also affect any use of the `id` attribute (`gitlab_*.*.id`) access in
32+
your Terraform configuration code.
33+
34+
## Change variable `value` attribute to non-sensitive
35+
36+
**Affected resources**:
37+
38+
- `gitlab_instance_variable`
39+
- `gitlab_group_variable`
40+
- `gitlab_project_variable`
41+
42+
The `value` attribute of the `gitlab_*_variable` resources has been changed
43+
from `sensitive` to non-sensitive.
44+
45+
Therefore, you may want to use the `sensitive()` or `nonsensitive()` Terraform functions.
46+
47+
## Require `expires_at` attribute for Project Access Tokens
48+
49+
The `expires_at` attribate for the `gitlab_project_access_token` resource is now required.
50+
51+
## Change `project_id` attribute to `project`
52+
53+
**Affected resources**:
54+
55+
- `gitlab_project_freeze_period`
56+
- `gitlab_project_level_mr_approvals`
57+
- `gitlab_project_membership`
58+
- `gitlab_project_share_group`
59+
60+
Some resources used a `project_id` attriute to identify a project by numerical id.
61+
This attribute has been removed in favor of a new `project` attribute which supports
62+
both numerical ids and full paths to the project to identify id.
63+
This aligns with the rest of the project-scoped resources.
64+
65+
## Change `group_id` attribute to `group`
66+
67+
- `gitlab_group_ldap_link`
68+
69+
Some resources used a `group_id` attriute to identify a group by numerical id.
70+
This attribute has been removed in favor of a new `group` attribute which supports
71+
both numerical ids and full paths to the group to identify id.
72+
This aligns with the rest of the group-scoped resources.
73+
74+
## Deprecate `gitlab_service_*` resources
75+
76+
All the `gitlab_service_*` resources have been deprecated in favor
77+
of the new `gitlab_integration_*` resources.
78+
Make sure to adapt to the new ones within the next 3 releases as we'll be
79+
removing the `gitlab_service_*` resources with the upcoming 16.3 release.
80+
81+
## Misc removals
82+
83+
- The `gitlab_managed_license` resource has been removed. There is no longer an upstream GitLab API for it.
84+
- The `operations_access_level` attribute was removed from the `gitlab_project` resource and data sources.

docs/resources/deploy_key.md

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ resource "gitlab_deploy_key" "example" {
4141

4242
### Read-Only
4343

44+
- `deploy_key_id` (Number) The id of the project deploy key.
4445
- `id` (String) The ID of this resource.
4546

4647
## Import

docs/resources/deploy_token.md

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ resource "gitlab_deploy_token" "example" {
5858

5959
### Read-Only
6060

61+
- `deploy_token_id` (Number) The id of the deploy token.
6162
- `id` (String) The ID of this resource.
6263
- `token` (String, Sensitive) The secret token. This is only populated when creating a new deploy token. **Note**: The token is not available for imported resources.
6364

docs/resources/group_label.md

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ resource "gitlab_group_label" "fixme" {
4040
### Read-Only
4141

4242
- `id` (String) The ID of this resource.
43+
- `label_id` (Number) The id of the group label.
4344

4445
## Import
4546

docs/resources/group_ldap_link.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ resource "gitlab_group_ldap_link" "test" {
2929

3030
### Required
3131

32-
- `cn` (String) The CN of the LDAP group to link with.
33-
- `group_id` (String) The id of the GitLab group.
32+
- `group` (String) The ID or URL-encoded path of the group
3433
- `ldap_provider` (String) The name of the LDAP provider as stored in the GitLab database. Note that this is NOT the value of the `label` attribute as shown in the web UI. In most cases this will be `ldapmain` but you may use the [LDAP check rake task](https://docs.gitlab.com/ee/administration/raketasks/ldap.html#check) for receiving the LDAP server name: `LDAP: ... Server: ldapmain`
3534

3635
### Optional
3736

3837
- `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`
38+
- `cn` (String) The CN of the LDAP group to link with. Required if `filter` is not provided.
39+
- `filter` (String) The LDAP filter for the group. Required if `cn` is not provided. Requires GitLab Premium or above.
3940
- `force` (Boolean) If true, then delete and replace an existing LDAP link if one exists.
4041
- `group_access` (String) Minimum access level for members of the LDAP group. Valid values are: `no one`, `minimal`, `guest`, `reporter`, `developer`, `maintainer`, `owner`, `master`
4142

@@ -48,6 +49,11 @@ resource "gitlab_group_ldap_link" "test" {
4849
Import is supported using the following syntax:
4950

5051
```shell
51-
# GitLab group ldap links can be imported using an id made up of `group_id:ldap_provider:cn`, e.g.
52-
terraform import gitlab_group_ldap_link.test "12345:ldapmain:testuser"
52+
# GitLab group ldap links can be imported using an id made up of `group_id:ldap_provider:cn:filter`. CN and Filter are mutually exclusive, so one will be missing.
53+
54+
# If using the CN for the group link, the ID will end with a blank filter (":"). e.g.,
55+
terraform import gitlab_group_ldap_link.test "12345:ldapmain:testcn:"
56+
57+
# If using the Filter for the group link, the ID will have two "::" in the middle due to having a blank CN. e.g.,
58+
terraform import gitlab_group_ldap_link.test "12345:ldapmain::testfilter"
5359
```

docs/resources/group_variable.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ resource "gitlab_group_variable" "example" {
3333

3434
- `group` (String) The name or id of the group.
3535
- `key` (String) The name of the variable.
36-
- `value` (String, Sensitive) The value of the variable.
36+
- `value` (String) The value of the variable.
3737

3838
### Optional
3939

4040
- `environment_scope` (String) The environment scope of the variable. Defaults to all environment (`*`). Note that in Community Editions of Gitlab, values other than `*` will cause inconsistent plans.
4141
- `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`.
4242
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
43+
- `raw` (Boolean) Whether the variable is treated as a raw string. Default: false. When true, variables in the value are not expanded.
4344
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
4445

4546
### Read-Only

docs/resources/instance_variable.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ resource "gitlab_instance_variable" "example" {
3030
### Required
3131

3232
- `key` (String) The name of the variable.
33-
- `value` (String, Sensitive) The value of the variable.
33+
- `value` (String) The value of the variable.
3434

3535
### Optional
3636

3737
- `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`.
3838
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
39+
- `raw` (Boolean) Whether the variable is treated as a raw string. Default: false. When true, variables in the value are not expanded.
3940
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
4041

4142
### Read-Only

0 commit comments

Comments
 (0)