Skip to content

Commit 8348b00

Browse files
authored
Merge branch 'gitlabhq:main' into lint-issue-AT001
2 parents f951203 + 59c52b9 commit 8348b00

File tree

47 files changed

+1782
-912
lines changed

Some content is hidden

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

47 files changed

+1782
-912
lines changed

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"go.testEnvVars": {
3+
"TF_ACC": "1",
4+
"GITLAB_TOKEN": "ACCTEST1234567890123",
5+
"GITLAB_BASE_URL": "http://127.0.0.1:8080"
6+
},
7+
"go.testFlags": ["-count=1", "-v"]
8+
}

GNUmakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ build: ## Build the provider binary.
1111

1212
generate: tool-tfplugindocs ## Generate files to be checked in.
1313
@# Setting empty environment variables to work around issue: https://github.com/hashicorp/terraform-plugin-docs/issues/12
14-
GITLAB_TOKEN="" $(GOBIN)/tfplugindocs generate
14+
@# Setting the PATH so that tfplugindocs uses the same terraform binary as other targets here, and to resolve a "Error: Incompatible provider version" error on M1 macs.
15+
GITLAB_TOKEN="" PATH="$(GOBIN):$(PATH)" $(GOBIN)/tfplugindocs generate
1516

1617
ifdef RUN
1718
TESTARGS += -test.run $(RUN)

docs/data-sources/group_variable.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_group_variable Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_group_variable data source allows to retrieve details about a group-level CI/CD variable.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/group_level_variables.html
8+
---
9+
10+
# gitlab_group_variable (Data Source)
11+
12+
The `gitlab_group_variable` data source allows to retrieve details about a group-level CI/CD variable.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html)
15+
16+
17+
18+
<!-- schema generated by tfplugindocs -->
19+
## Schema
20+
21+
### Required
22+
23+
- `group` (String) The name or id of the group.
24+
- `key` (String) The name of the variable.
25+
26+
### Optional
27+
28+
- `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.
29+
- `id` (String) The ID of this resource.
30+
31+
### Read-Only
32+
33+
- `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`.
34+
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
35+
- `value` (String) The value of the variable.
36+
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
37+
38+

docs/data-sources/group_variables.md

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_variables Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_group_variables data source allows to retrieve all group-level CI/CD variables.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/group_level_variables.html
8+
---
9+
10+
# gitlab_group_variables (Data Source)
11+
12+
The `gitlab_group_variables` data source allows to retrieve all group-level CI/CD variables.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html)
15+
16+
17+
18+
<!-- schema generated by tfplugindocs -->
19+
## Schema
20+
21+
### Required
22+
23+
- `group` (String) The name or id of the group.
24+
25+
### Optional
26+
27+
- `environment_scope` (String) The environment scope of the variable. Defaults to all environment (`*`).
28+
- `id` (String) The ID of this resource.
29+
30+
### Read-Only
31+
32+
- `variables` (List of Object) The list of variables returned by the search (see [below for nested schema](#nestedatt--variables))
33+
34+
<a id="nestedatt--variables"></a>
35+
### Nested Schema for `variables`
36+
37+
Read-Only:
38+
39+
- `environment_scope` (String)
40+
- `group` (String)
41+
- `key` (String)
42+
- `masked` (Boolean)
43+
- `protected` (Boolean)
44+
- `value` (String)
45+
- `variable_type` (String)
46+
47+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_instance_variable Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_instance_variable data source allows to retrieve details about an instance-level CI/CD variable.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/instance_level_ci_variables.html
8+
---
9+
10+
# gitlab_instance_variable (Data Source)
11+
12+
The `gitlab_instance_variable` data source allows to retrieve details about an instance-level CI/CD variable.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html)
15+
16+
17+
18+
<!-- schema generated by tfplugindocs -->
19+
## Schema
20+
21+
### Required
22+
23+
- `key` (String) The name of the variable.
24+
25+
### Optional
26+
27+
- `id` (String) The ID of this resource.
28+
29+
### Read-Only
30+
31+
- `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`.
32+
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
33+
- `value` (String) The value of the variable.
34+
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
35+
36+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_instance_variables Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_instance_variables data source allows to retrieve all instance-level CI/CD variables.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/instance_level_ci_variables.html
8+
---
9+
10+
# gitlab_instance_variables (Data Source)
11+
12+
The `gitlab_instance_variables` data source allows to retrieve all instance-level CI/CD variables.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/instance_level_ci_variables.html)
15+
16+
17+
18+
<!-- schema generated by tfplugindocs -->
19+
## Schema
20+
21+
### Optional
22+
23+
- `id` (String) The ID of this resource.
24+
25+
### Read-Only
26+
27+
- `variables` (List of Object) The list of variables returned by the search (see [below for nested schema](#nestedatt--variables))
28+
29+
<a id="nestedatt--variables"></a>
30+
### Nested Schema for `variables`
31+
32+
Read-Only:
33+
34+
- `key` (String)
35+
- `masked` (Boolean)
36+
- `protected` (Boolean)
37+
- `value` (String)
38+
- `variable_type` (String)
39+
40+

docs/data-sources/project_variable.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_project_variable Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_project_variable data source allows to retrieve details about a project-level CI/CD variable.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/project_level_variables.html
8+
---
9+
10+
# gitlab_project_variable (Data Source)
11+
12+
The `gitlab_project_variable` data source allows to retrieve details about a project-level CI/CD variable.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html)
15+
16+
17+
18+
<!-- schema generated by tfplugindocs -->
19+
## Schema
20+
21+
### Required
22+
23+
- `key` (String) The name of the variable.
24+
- `project` (String) The name or id of the project.
25+
26+
### Optional
27+
28+
- `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.
29+
- `id` (String) The ID of this resource.
30+
31+
### Read-Only
32+
33+
- `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`.
34+
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
35+
- `value` (String) The value of the variable.
36+
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
37+
38+
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_project_variables Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_project_variables data source allows to retrieve all project-level CI/CD variables.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/project_level_variables.html
8+
---
9+
10+
# gitlab_project_variables (Data Source)
11+
12+
The `gitlab_project_variables` data source allows to retrieve all project-level CI/CD variables.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/project_level_variables.html)
15+
16+
17+
18+
<!-- schema generated by tfplugindocs -->
19+
## Schema
20+
21+
### Required
22+
23+
- `project` (String) The name or id of the project.
24+
25+
### Optional
26+
27+
- `environment_scope` (String) The environment scope of the variable. Defaults to all environment (`*`).
28+
- `id` (String) The ID of this resource.
29+
30+
### Read-Only
31+
32+
- `variables` (List of Object) The list of variables returned by the search (see [below for nested schema](#nestedatt--variables))
33+
34+
<a id="nestedatt--variables"></a>
35+
### Nested Schema for `variables`
36+
37+
Read-Only:
38+
39+
- `environment_scope` (String)
40+
- `key` (String)
41+
- `masked` (Boolean)
42+
- `project` (String)
43+
- `protected` (Boolean)
44+
- `value` (String)
45+
- `variable_type` (String)
46+
47+

docs/resources/group_variable.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ resource "gitlab_group_variable" "example" {
3737

3838
### Optional
3939

40-
- `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. See https://docs.gitlab.com/ee/ci/variables/#add-a-cicd-variable-to-a-group
40+
- `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
- `id` (String) The ID of this resource.
4242
- `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`.
4343
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
44-
- `variable_type` (String) The type of a variable. Available types are: env_var (default) and file.
44+
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
4545

4646
## Import
4747

docs/resources/instance_variable.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
page_title: "gitlab_instance_variable Resource - terraform-provider-gitlab"
44
subcategory: ""
55
description: |-
6-
The gitlab_instance_variable resource allows to manage the lifecycle of a CI/CD variable for an instance.
6+
The gitlab_instance_variable resource allows to manage the lifecycle of an instance-level CI/CD variable.
77
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/instance_level_variables.html
88
---
99

1010
# gitlab_instance_variable (Resource)
1111

12-
The `gitlab_instance_variable` resource allows to manage the lifecycle of a CI/CD variable for an instance.
12+
The `gitlab_instance_variable` resource allows to manage the lifecycle of an instance-level CI/CD variable.
1313

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

@@ -35,9 +35,9 @@ resource "gitlab_instance_variable" "example" {
3535
### Optional
3636

3737
- `id` (String) The ID of this resource.
38-
- `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-variable-requirements). Defaults to `false`.
38+
- `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`.
3939
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
40-
- `variable_type` (String) The type of a variable. Available types are: env_var (default) and file.
40+
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.
4141

4242
## Import
4343

0 commit comments

Comments
 (0)