-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1921fc
commit 2f662cd
Showing
5 changed files
with
149 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "gitlab_value_stream_analytics Resource - terraform-provider-gitlab" | ||
subcategory: "" | ||
description: |- | ||
The gitlab_value_stream_analytics resource allows to manage the lifecycle of value stream analytics. | ||
-> This resource requires a GitLab Enterprise instance with a Premium license to create custom value stream analytics. | ||
Upstream API: GitLab GraphQL API docs https://docs.gitlab.com/ee/api/graphql/reference/#mutationvaluestreamcreate | ||
--- | ||
|
||
# gitlab_value_stream_analytics (Resource) | ||
|
||
The `gitlab_value_stream_analytics` resource allows to manage the lifecycle of value stream analytics. | ||
|
||
-> This resource requires a GitLab Enterprise instance with a Premium license to create custom value stream analytics. | ||
|
||
**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationvaluestreamcreate) | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "gitlab_value_stream_analytics" "project" { | ||
name = "TEST" | ||
project_full_path = "test/project" | ||
stages = [ | ||
{ | ||
name = "Issue" | ||
custom = false | ||
hidden = false | ||
}, | ||
{ | ||
name = "Issue Labels" | ||
custom = true | ||
hidden = false | ||
start_event_identifier = "ISSUE_LABEL_ADDED" | ||
start_event_label_id = "gid://gitlab/ProjectLabel/0" | ||
end_event_identifier = "ISSUE_LABEL_REMOVED" | ||
end_event_label_id = "gid://gitlab/ProjectLabel/1" | ||
} | ||
] | ||
} | ||
resource "gitlab_value_stream_analytics" "group" { | ||
name = "TEST" | ||
group_full_path = "test/group" | ||
stages = [ | ||
{ | ||
name = "Issue" | ||
custom = false | ||
hidden = false | ||
}, | ||
{ | ||
name = "Issue Labels" | ||
custom = true | ||
hidden = false | ||
start_event_identifier = "ISSUE_LABEL_ADDED" | ||
start_event_label_id = "gid://gitlab/GroupLabel/0" | ||
end_event_identifier = "ISSUE_LABEL_REMOVED" | ||
end_event_label_id = "gid://gitlab/GroupLabel/1" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the value stream | ||
- `stages` (Attributes Set) Stages of the value stream (see [below for nested schema](#nestedatt--stages)) | ||
|
||
### Optional | ||
|
||
- `group_full_path` (String) Full path of the group the value stream is created in. **One of `group_full_path` OR `project_full_path` is required.** | ||
- `project_full_path` (String) Full path of the project the value stream is created in. **One of `group_full_path` OR `project_full_path` is required.** | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The Terraform ID of the value stream in the format of `group:<group_full_path>:<id>` or `project:<project_full_path>:<id>`. | ||
|
||
<a id="nestedatt--stages"></a> | ||
### Nested Schema for `stages` | ||
|
||
Required: | ||
|
||
- `name` (String) The name of the value stream stage. | ||
|
||
Optional: | ||
|
||
- `custom` (Boolean) Boolean whether the stage is customized. If false, it assigns a built-in default stage by name. | ||
- `end_event_identifier` (String) End event identifier. Valid values are: `CODE_STAGE_START`, `ISSUE_CLOSED`, `ISSUE_CREATED`, `ISSUE_DEPLOYED_TO_PRODUCTION`, `ISSUE_FIRST_ADDED_TO_BOARD`, `ISSUE_FIRST_ADDED_TO_ITERATION`, `ISSUE_FIRST_ASSIGNED_AT`, `ISSUE_FIRST_ASSOCIATED_WITH_MILESTONE`, `ISSUE_FIRST_MENTIONED_IN_COMMIT`, `ISSUE_LABEL_ADDED`, `ISSUE_LABEL_REMOVED`, `ISSUE_LAST_EDITED`, `ISSUE_STAGE_END`, `MERGE_REQUEST_CLOSED`, `MERGE_REQUEST_CREATED`, `MERGE_REQUEST_FIRST_ASSIGNED_AT`, `MERGE_REQUEST_FIRST_COMMIT_AT`, `MERGE_REQUEST_FIRST_DEPLOYTED_TO_PRODUCTION`, `MERGE_REQUEST_LABEL_ADDED`, `MERGE_REQUEST_LABEL_REMOVED`, `MERGE_REQUEST_LAST_BUILD_FINISHED`, `MERGE_REQUEST_LAST_BUILD_STARTED`, `MERGE_REQUEST_LAST_EDITED`, `MERGE_REQUEST_MERGED`, `MERGE_REQUEST_REVIEWER_FIRST_ASSIGNED`, `MERGE_REQUEST_PLAN_STAGE_START` | ||
- `end_event_label_id` (String) Label ID associated with the end event identifier. In the format of `gid://gitlab/GroupLabel/<id>` or `gid://gitlab/ProjectLabel/<id>` | ||
- `hidden` (Boolean) Boolean whether the stage is hidden, GitLab provided default stages are hidden by default. | ||
- `start_event_identifier` (String) Start event identifier. Valid values are: `CODE_STAGE_START`, `ISSUE_CLOSED`, `ISSUE_CREATED`, `ISSUE_DEPLOYED_TO_PRODUCTION`, `ISSUE_FIRST_ADDED_TO_BOARD`, `ISSUE_FIRST_ADDED_TO_ITERATION`, `ISSUE_FIRST_ASSIGNED_AT`, `ISSUE_FIRST_ASSOCIATED_WITH_MILESTONE`, `ISSUE_FIRST_MENTIONED_IN_COMMIT`, `ISSUE_LABEL_ADDED`, `ISSUE_LABEL_REMOVED`, `ISSUE_LAST_EDITED`, `ISSUE_STAGE_END`, `MERGE_REQUEST_CLOSED`, `MERGE_REQUEST_CREATED`, `MERGE_REQUEST_FIRST_ASSIGNED_AT`, `MERGE_REQUEST_FIRST_COMMIT_AT`, `MERGE_REQUEST_FIRST_DEPLOYTED_TO_PRODUCTION`, `MERGE_REQUEST_LABEL_ADDED`, `MERGE_REQUEST_LABEL_REMOVED`, `MERGE_REQUEST_LAST_BUILD_FINISHED`, `MERGE_REQUEST_LAST_BUILD_STARTED`, `MERGE_REQUEST_LAST_EDITED`, `MERGE_REQUEST_MERGED`, `MERGE_REQUEST_REVIEWER_FIRST_ASSIGNED`, `MERGE_REQUEST_PLAN_STAGE_START` | ||
- `start_event_label_id` (String) Label ID associated with the start event identifier. In the format of `gid://gitlab/GroupLabel/<id>` or `gid://gitlab/ProjectLabel/<id>` | ||
|
||
Read-Only: | ||
|
||
- `id` (String) The ID of the value stream stage. | ||
|
||
## Import | ||
|
||
Starting in Terraform v1.5.0 you can use an [import block](https://developer.hashicorp.com/terraform/language/import) to import `gitlab_value_stream_analytics`. For example: | ||
```terraform | ||
import { | ||
to = gitlab_value_stream_analytics.example | ||
id = "see CLI command below for ID" | ||
} | ||
``` | ||
|
||
Import using the CLI is supported using the following syntax: | ||
|
||
```shell | ||
# Gitlab value stream analytics can be imported with a key composed of `<full_path_type>:<full_path>:<value_stream_id>`, e.g. | ||
terraform import gitlab_value_stream_analytics.group "group:people/engineers:42" | ||
|
||
terraform import gitlab_value_stream_analytics.project "project:projects/sample:43" | ||
``` |