Skip to content

Commit a584660

Browse files
Update docs for v18.3.0 release
1 parent f2f5c4f commit a584660

17 files changed

+294
-48
lines changed

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
## 18.3.0 (2025-08-22)
2+
3+
### FEATURES (3 changes)
4+
5+
- [Add new `gitlab_group_deploy_token` and `gitlab_project_deploy_token` resources. The existing generic `gitlab_deploy_token` resource has now been deprecated.](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/888655dc0fe8b5a2733efbf06465164055afbe1c) by @mness ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2604))
6+
- [Add new `gitlab_group_saml_links` datasource](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/e17475001ccb12a5bb0588411e74092f7c2f006f) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2584))
7+
- [Support client-go config file for provider authentication. See more information here: https://gitlab.com/gitlab-org/api/client-go#use-the-config-package-experimental](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/95a83237e7b2a1cb34149591d61a742f1d8ef179) by @timofurrer ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2592))
8+
9+
### IMPROVEMENTS (6 changes)
10+
11+
- resource/gitlab_project_level_notifications: [Update to handle unknown value validation](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/1bbebb2c0fd8f09f555a88d968c621fed6d662c9) by @PatrickRice ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2600))
12+
- resource/gitlab_group: [Add support for `administrator` to `project_creation_level`](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/2813a1a504a3f7bae3cced0cdedf1016f87ee291) by @aldo.salas1 ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2601))
13+
- resource/gitlab_group_security_policy_attachments: [This resource now checks permissions prior to adding the policy, and fails with a informative error if permissions are missing](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/ce294bfe8a1d1980aeb1179c0b908e2bffc4a75e) by @PatrickRice ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2593))
14+
- resource/gitlab_project_security_policy_attachments: [This resource now checks permissions prior to adding the policy, and fails with a informative error if permissions are missing](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/ce294bfe8a1d1980aeb1179c0b908e2bffc4a75e) by @PatrickRice ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2593))
15+
- resource/gitlab_deploy_token: [Add support for previously missing scope options](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/888655dc0fe8b5a2733efbf06465164055afbe1c) by @mness ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2604))
16+
- resource/gitlab_instance_service_account: [Allow instance service accounts to be created without username and/or name](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/642a9beb08e1248867ac3e0098aa765f65119bdb) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2585))
17+
18+
### BUG FIXES (6 changes)
19+
20+
- resource/gitlab_global_level_notifications: [Update to handle unknown value validation](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/d36f740539b2a54490a50cf3bd1a03cab7981cad) by @PatrickRice ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2595))
21+
- resource/gitlab_project_level_notifications: [Update to handle unknown value validation](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/1bbebb2c0fd8f09f555a88d968c621fed6d662c9) by @PatrickRice ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2600))
22+
- resource/gitlab_project_protected_environment: [Fix error in protected environment using unknown deploy attributes](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/ec63e4f688c9cf5a9d1bd6e7ac2999440580dcf1) by @PatrickRice ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2594))
23+
- resource/gitlab_project_integration_github: [Fix a provider panic that occurs when importing a non-existent integration](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/068405a8b0762ca680bed8943d32763bdafe19dc) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2599))
24+
- resource/gitlab_group_dependency_proxy: [Fixed a bug where importing using an `import` block caused an immediate replace](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/7be6298efafe222e23523554bd660f3a5a43d37a) by @PatrickRice ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2607))
25+
- resource/gitlab_group: [Fixed an issue with `permanently_remove_on_delete` that occurred when deleting groups on GitLab versions later than 18.0](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/commit/1a09f11f064069a9e19d26bdf592c5ea608af5b7) by @heidi.berry ([merge request](https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/merge_requests/2598))
26+
127
## 18.2.0 (2025-07-17)
228

329
### FEATURES (2 changes)

docs/data-sources/cluster_agents.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
page_title: "gitlab_cluster_agents Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
The gitlab_cluster_agents data source allows details of GitLab Agents for Kubernetes in a project.
6+
The gitlab_cluster_agents data source retrieves details of GitLab Agents for Kubernetes in a project.
77
Upstream API: GitLab REST API docs https://docs.gitlab.com/api/cluster_agents/
88
---
99

1010
# gitlab_cluster_agents (Data Source)
1111

12-
The `gitlab_cluster_agents` data source allows details of GitLab Agents for Kubernetes in a project.
12+
The `gitlab_cluster_agents` data source retrieves details of GitLab Agents for Kubernetes in a project.
1313

1414
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/cluster_agents/)
1515

@@ -26,20 +26,20 @@ data "gitlab_cluster_agents" "agents" {
2626

2727
### Required
2828

29-
- `project` (String) The ID or full path of the project owned by the authenticated user.
29+
- `project` (String) ID or full path of the project maintained by the authenticated user.
3030

3131
### Read-Only
3232

33-
- `cluster_agents` (List of Object) List of the registered agents. (see [below for nested schema](#nestedatt--cluster_agents))
34-
- `id` (String) The ID of this resource.
33+
- `cluster_agents` (Attributes List) List of the registered agents. (see [below for nested schema](#nestedatt--cluster_agents))
34+
- `id` (String) The ID of this data source. In the format <project>
3535

3636
<a id="nestedatt--cluster_agents"></a>
3737
### Nested Schema for `cluster_agents`
3838

3939
Read-Only:
4040

41-
- `agent_id` (Number)
42-
- `created_at` (String)
43-
- `created_by_user_id` (Number)
44-
- `name` (String)
45-
- `project` (String)
41+
- `agent_id` (Number) The ID of the agent.
42+
- `created_at` (String) The ISO8601 datetime when the agent was created.
43+
- `created_by_user_id` (Number) The ID of the user who created the agent.
44+
- `name` (String) The Name of the agent.
45+
- `project` (String) ID or full path of the project maintained by the authenticated user.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_group_saml_links Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_group_saml_links data source retrieves all SAML links for a specified group.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/api/saml/#saml-group-links
8+
---
9+
10+
# gitlab_group_saml_links (Data Source)
11+
12+
The `gitlab_group_saml_links` data source retrieves all SAML links for a specified group.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/saml/#saml-group-links)
15+
16+
## Example Usage
17+
18+
```terraform
19+
data "gitlab_group" "example" {
20+
id = "foo/bar/baz"
21+
}
22+
23+
data "gitlab_group_saml_links" "example" {
24+
group = data.gitlab_group.example.id
25+
}
26+
```
27+
28+
<!-- schema generated by tfplugindocs -->
29+
## Schema
30+
31+
### Required
32+
33+
- `group` (String) The name or id of the group.
34+
35+
### Read-Only
36+
37+
- `id` (String) The ID of this Terraform resource. In the format <group-id>
38+
- `saml_links` (Attributes List) The list of group SAML links returned by the search (see [below for nested schema](#nestedatt--saml_links))
39+
40+
<a id="nestedatt--saml_links"></a>
41+
### Nested Schema for `saml_links`
42+
43+
Read-Only:
44+
45+
- `access_level` (String) The base access level for members of the SAML group.
46+
- `member_role_id` (Number) Member Role ID (custom role for members of the SAML group.
47+
- `name` (String) Name of the SAML group.

docs/data-sources/instance_variable.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
page_title: "gitlab_instance_variable Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
The gitlab_instance_variable data source allows to retrieve details about an instance-level CI/CD variable.
6+
The gitlab_instance_variable data source retrieves details about an instance-level CI/CD variable.
77
Upstream API: GitLab REST API docs https://docs.gitlab.com/api/instance_level_ci_variables/
88
---
99

1010
# gitlab_instance_variable (Data Source)
1111

12-
The `gitlab_instance_variable` data source allows to retrieve details about an instance-level CI/CD variable.
12+
The `gitlab_instance_variable` data source retrieves details about an instance-level CI/CD variable.
1313

1414
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/instance_level_ci_variables/)
1515

@@ -31,9 +31,9 @@ data "gitlab_instance_variable" "foo" {
3131
### Read-Only
3232

3333
- `description` (String) The description of the variable. Maximum of 255 characters.
34-
- `id` (String) The ID of this resource.
35-
- `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/ci/variables/#masked-variables). Defaults to `false`.
36-
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
37-
- `raw` (Boolean) Whether the variable is treated as a raw string. Default: false. When true, variables in the value are not expanded.
34+
- `id` (String) The ID of this datasource. In the format `<key>`.
35+
- `masked` (Boolean) If set to `true`, the value of the variable will be hidden in job logs.
36+
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags.
37+
- `raw` (Boolean) If set to `true`, the variable will be treated as a raw string.
3838
- `value` (String) The value of the variable.
39-
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
39+
- `variable_type` (String) The type of the variable, either `env_var` or `file`.

docs/data-sources/instance_variables.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
page_title: "gitlab_instance_variables Data Source - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
The gitlab_instance_variables data source allows to retrieve all instance-level CI/CD variables.
6+
The gitlab_instance_variables data source retrieves all instance-level CI/CD variables.
77
Upstream API: GitLab REST API docs https://docs.gitlab.com/api/instance_level_ci_variables/
88
---
99

1010
# gitlab_instance_variables (Data Source)
1111

12-
The `gitlab_instance_variables` data source allows to retrieve all instance-level CI/CD variables.
12+
The `gitlab_instance_variables` data source retrieves all instance-level CI/CD variables.
1313

1414
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/api/instance_level_ci_variables/)
1515

@@ -24,18 +24,18 @@ data "gitlab_instance_variables" "vars" {}
2424

2525
### Read-Only
2626

27-
- `id` (String) The ID of this resource.
28-
- `variables` (List of Object) The list of variables returned by the search (see [below for nested schema](#nestedatt--variables))
27+
- `id` (String) The ID of this datasource. In the hardcoded format `instance_variables`.
28+
- `variables` (Attributes List) The list of variables returned by the search. (see [below for nested schema](#nestedatt--variables))
2929

3030
<a id="nestedatt--variables"></a>
3131
### Nested Schema for `variables`
3232

3333
Read-Only:
3434

35-
- `description` (String)
36-
- `key` (String)
37-
- `masked` (Boolean)
38-
- `protected` (Boolean)
39-
- `raw` (Boolean)
40-
- `value` (String)
41-
- `variable_type` (String)
35+
- `description` (String) The description of the variable. Maximum of 255 characters.
36+
- `key` (String) The name of the variable.
37+
- `masked` (Boolean) If set to `true`, the value of the variable will be hidden in job logs.
38+
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags.
39+
- `raw` (Boolean) If set to `true`, the variable will be treated as a raw string.
40+
- `value` (String) The value of the variable.
41+
- `variable_type` (String) The type of the variable, either `env_var` or `file`.

docs/data-sources/project_variable.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ data "gitlab_project_variable" "bar" {
3535
### Required
3636

3737
- `key` (String) The name of the variable.
38-
- `project` (String) The name or id of the project.
38+
- `project` (String) The name or path of the project.
3939

4040
### Optional
4141

42-
- `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.
42+
- `environment_scope` (String) The environment scope of the variable. Defaults to all environment (`*`).
4343

4444
### Read-Only
4545

46-
- `description` (String) The description of the variable.
47-
- `id` (String) The ID of this resource.
48-
- `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/ci/variables/#masked-variables). Defaults to `false`.
49-
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
50-
- `raw` (Boolean) Whether the variable is treated as a raw string. Default: false. When true, variables in the value are not expanded.
46+
- `description` (String) The description of the variable. Maximum of 255 characters.
47+
- `id` (String) The ID of this datasource. In the format `<project:key:environment-scope>`.
48+
- `masked` (Boolean) If set to `true`, the value of the variable will be hidden in job logs.
49+
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags.
50+
- `raw` (Boolean) If set to `true`, the variable will be treated as a raw string.
5151
- `value` (String) The value of the variable.
52-
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
52+
- `variable_type` (String) The type of the variable, either `env_var` or `file`.

docs/development/CreatingANewResource.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ func (r *gitlabApplicationResource) Create(ctx context.Context, req resource.Cre
318318
}
319319

320320
// Create application
321-
application, _, err := r.client.Applications.CreateApplication(options)
321+
application, _, err := r.client.Applications.CreateApplication(options, gitlab.WithContext(ctx))
322322
if err != nil {
323323
resp.Diagnostics.AddError("GitLab API error occurred", fmt.Sprintf("Unable to create application: %s", err.Error()))
324324
return
@@ -347,7 +347,7 @@ the input follows terraform best practices.
347347
will not be passed to the API, and either defaults will be used or the value will not be set by the API.
348348
4. `if !data.Confidential.IsNull() {...}` checks to see if an optional value is null. If the value is not null, it's added to the `options`
349349
struct to be passed to the API.
350-
5. `application, _, err := r.client.Applications.CreateApplication(options)` calls the API with the input options to create the application.
350+
5. `application, _, err := r.client.Applications.CreateApplication(options, gitlab.WithContext(ctx))` calls the API with the input options to create the application.
351351
6. Just like in the `Read` func, `r.applicationModelToState(application, data)` sets the newly created application into the data object
352352
7. Finally, like in the `Read` func, `resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)` sets the data into state.
353353

docs/index.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ We support the following versions:
2020

2121
All other versions are best effort support.
2222

23+
We do not support experimental GitLab features until they are enabled by default or made Generally Available.
24+
2325
-> Note, that the compatibility between a provider release and GitLab itself **cannot** be inferred from the
2426
release version. New features added to GitLab may not be added to the provider until later versions.
2527
Equally, features removed or deprecated in GitLab may not be removed or deprecated from the provider until later versions.
@@ -32,9 +34,18 @@ Use the navigation to the left to read about the valid data sources and resource
3234
This provider requires at least [Terraform 1.0](https://www.terraform.io/downloads.html).
3335
A minimum of Terraform 1.4.0 is recommended.
3436

35-
-> Using a Project or Group access token may cause issues with some resources, as those token types don't
37+
-> Using a Project or Group access token may cause issues with some resources, as those token types don't
3638
have full access to every API. This is also true when using a `CI_JOB_TOKEN`. Consider using a dedicated
37-
Personal Access Token or Service Account if you are experiencing permission errors when adding resources.
39+
Personal Access Token or Service Account if you are experiencing permission errors when adding resources.
40+
41+
## Authentication and Configuration
42+
43+
The configuration for the GitLab Provider can be derived from several sources,
44+
which are applied in the following order:
45+
46+
1. Attributes in the provider configuration (see Schema section below)
47+
2. Environment variables (see Schema section below)
48+
3. (experimental) Configuration file (see https://gitlab.com/gitlab-org/api/client-go#use-the-config-package-experimental)
3849

3950
## Example Usage
4051

@@ -92,7 +103,10 @@ resource "gitlab_project" "sample_group_project" {
92103
- `cacert_file` (String) This is a file containing the ca cert to verify the gitlab instance. This is available for use when working with GitLab CE or Gitlab Enterprise with a locally-issued or self-signed certificate chain.
93104
- `client_cert` (String) File path to client certificate when GitLab instance is behind company proxy. File must contain PEM encoded data.
94105
- `client_key` (String) File path to client key when GitLab instance is behind company proxy. File must contain PEM encoded data. Required when `client_cert` is set.
106+
- `config_file` (String) The path to the configuration file to use. It may be sourced from the `GITLAB_CONFIG_FILE` environment variable.
107+
- `context` (String) The context to use for authentication and configuration. The context must exist in the configuration file. It may be sourced from the `GITLAB_CONTEXT` environment variable.
95108
- `early_auth_check` (Boolean) (Experimental) By default the provider does a dummy request to get the current user in order to verify that the provider configuration is correct and the GitLab API is reachable. Set this to `false` to skip this check. This may be useful if the GitLab instance does not yet exist and is created within the same terraform module. It may be sourced from the `GITLAB_EARLY_AUTH_CHECK`. This is an experimental feature and may change in the future. Please make sure to always keep backups of your state.
109+
- `enable_auto_ci_support` (Boolean) If automatic CI support should be enabled or not. This only works when not providing a token.
96110
- `headers` (Map of String) A map of headers to append to all API request to the GitLab instance.
97111
- `insecure` (Boolean) When set to true this disables SSL verification of the connection to the GitLab instance.
98112
- `retries` (Number) The number of retries to execute when receiving a 429 Rate Limit error. Each retry will exponentially back off.

docs/resources/cluster_agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ resource "gitlab_repository_file" "example_agent_config" {
6363
- `agent_id` (Number) The ID of the agent.
6464
- `created_at` (String) The ISO8601 datetime when the agent was created.
6565
- `created_by_user_id` (Number) The ID of the user who created the agent.
66-
- `id` (String) The ID of this resource.
66+
- `id` (String) The ID of this resource. In the format <project:agent_id>
6767

6868
## Import
6969

0 commit comments

Comments
 (0)