Skip to content

Commit

Permalink
Merge branch 'gitlabhq:main' into lint-issue-AT001
Browse files Browse the repository at this point in the history
  • Loading branch information
Shocktrooper committed Apr 3, 2022
2 parents f951203 + 59c52b9 commit 8348b00
Show file tree
Hide file tree
Showing 47 changed files with 1,782 additions and 912 deletions.
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"go.testEnvVars": {
"TF_ACC": "1",
"GITLAB_TOKEN": "ACCTEST1234567890123",
"GITLAB_BASE_URL": "http://127.0.0.1:8080"
},
"go.testFlags": ["-count=1", "-v"]
}
3 changes: 2 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ build: ## Build the provider binary.

generate: tool-tfplugindocs ## Generate files to be checked in.
@# Setting empty environment variables to work around issue: https://github.com/hashicorp/terraform-plugin-docs/issues/12
GITLAB_TOKEN="" $(GOBIN)/tfplugindocs generate
@# 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.
GITLAB_TOKEN="" PATH="$(GOBIN):$(PATH)" $(GOBIN)/tfplugindocs generate

ifdef RUN
TESTARGS += -test.run $(RUN)
Expand Down
38 changes: 38 additions & 0 deletions docs/data-sources/group_variable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gitlab_group_variable Data Source - terraform-provider-gitlab"
subcategory: ""
description: |-
The gitlab_group_variable data source allows to retrieve details about a group-level CI/CD variable.
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/group_level_variables.html
---

# gitlab_group_variable (Data Source)

The `gitlab_group_variable` data source allows to retrieve details about a group-level CI/CD variable.

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



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `group` (String) The name or id of the group.
- `key` (String) The name of the variable.

### Optional

- `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.
- `id` (String) The ID of this resource.

### Read-Only

- `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`.
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
- `value` (String) The value of the variable.
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.


47 changes: 47 additions & 0 deletions docs/data-sources/group_variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gitlab_group_variables Data Source - terraform-provider-gitlab"
subcategory: ""
description: |-
The gitlab_group_variables data source allows to retrieve all group-level CI/CD variables.
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/group_level_variables.html
---

# gitlab_group_variables (Data Source)

The `gitlab_group_variables` data source allows to retrieve all group-level CI/CD variables.

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



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `group` (String) The name or id of the group.

### Optional

- `environment_scope` (String) The environment scope of the variable. Defaults to all environment (`*`).
- `id` (String) The ID of this resource.

### Read-Only

- `variables` (List of Object) The list of variables returned by the search (see [below for nested schema](#nestedatt--variables))

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

Read-Only:

- `environment_scope` (String)
- `group` (String)
- `key` (String)
- `masked` (Boolean)
- `protected` (Boolean)
- `value` (String)
- `variable_type` (String)


36 changes: 36 additions & 0 deletions docs/data-sources/instance_variable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gitlab_instance_variable Data Source - terraform-provider-gitlab"
subcategory: ""
description: |-
The gitlab_instance_variable data source allows to retrieve details about an instance-level CI/CD variable.
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/instance_level_ci_variables.html
---

# gitlab_instance_variable (Data Source)

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

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



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `key` (String) The name of the variable.

### Optional

- `id` (String) The ID of this resource.

### Read-Only

- `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`.
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
- `value` (String) The value of the variable.
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.


40 changes: 40 additions & 0 deletions docs/data-sources/instance_variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gitlab_instance_variables Data Source - terraform-provider-gitlab"
subcategory: ""
description: |-
The gitlab_instance_variables data source allows to retrieve all instance-level CI/CD variables.
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/instance_level_ci_variables.html
---

# gitlab_instance_variables (Data Source)

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

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



<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `id` (String) The ID of this resource.

### Read-Only

- `variables` (List of Object) The list of variables returned by the search (see [below for nested schema](#nestedatt--variables))

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

Read-Only:

- `key` (String)
- `masked` (Boolean)
- `protected` (Boolean)
- `value` (String)
- `variable_type` (String)


38 changes: 38 additions & 0 deletions docs/data-sources/project_variable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gitlab_project_variable Data Source - terraform-provider-gitlab"
subcategory: ""
description: |-
The gitlab_project_variable data source allows to retrieve details about a project-level CI/CD variable.
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/project_level_variables.html
---

# gitlab_project_variable (Data Source)

The `gitlab_project_variable` data source allows to retrieve details about a project-level CI/CD variable.

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



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `key` (String) The name of the variable.
- `project` (String) The name or id of the project.

### Optional

- `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.
- `id` (String) The ID of this resource.

### Read-Only

- `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`.
- `protected` (Boolean) If set to `true`, the variable will be passed only to pipelines running on protected branches and tags. Defaults to `false`.
- `value` (String) The value of the variable.
- `variable_type` (String) The type of a variable. Valid values are: `env_var`, `file`. Default is `env_var`.


47 changes: 47 additions & 0 deletions docs/data-sources/project_variables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "gitlab_project_variables Data Source - terraform-provider-gitlab"
subcategory: ""
description: |-
The gitlab_project_variables data source allows to retrieve all project-level CI/CD variables.
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/project_level_variables.html
---

# gitlab_project_variables (Data Source)

The `gitlab_project_variables` data source allows to retrieve all project-level CI/CD variables.

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



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `project` (String) The name or id of the project.

### Optional

- `environment_scope` (String) The environment scope of the variable. Defaults to all environment (`*`).
- `id` (String) The ID of this resource.

### Read-Only

- `variables` (List of Object) The list of variables returned by the search (see [below for nested schema](#nestedatt--variables))

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

Read-Only:

- `environment_scope` (String)
- `key` (String)
- `masked` (Boolean)
- `project` (String)
- `protected` (Boolean)
- `value` (String)
- `variable_type` (String)


4 changes: 2 additions & 2 deletions docs/resources/group_variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ resource "gitlab_group_variable" "example" {

### Optional

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

## Import

Expand Down
8 changes: 4 additions & 4 deletions docs/resources/instance_variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
page_title: "gitlab_instance_variable Resource - terraform-provider-gitlab"
subcategory: ""
description: |-
The gitlab_instance_variable resource allows to manage the lifecycle of a CI/CD variable for an instance.
The gitlab_instance_variable resource allows to manage the lifecycle of an instance-level CI/CD variable.
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/instance_level_variables.html
---

# gitlab_instance_variable (Resource)

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

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

Expand All @@ -35,9 +35,9 @@ resource "gitlab_instance_variable" "example" {
### Optional

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

## Import

Expand Down

0 comments on commit 8348b00

Please sign in to comment.