Skip to content

Commit c394b13

Browse files
committed
Docs
1 parent 9f5fd59 commit c394b13

File tree

13 files changed

+616
-394
lines changed

13 files changed

+616
-394
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_project_milestone Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_project_milestone data source allows details of a project milestone.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/milestones.html
8+
---
9+
10+
# gitlab_project_milestone (Data Source)
11+
12+
The `gitlab_project_milestone` data source allows details of a project milestone.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html)
15+
16+
## Example Usage
17+
18+
```terraform
19+
# By project ID
20+
data "gitlab_project_milestone" "example" {
21+
project_id = "12345"
22+
milestone_id = 10
23+
}
24+
25+
# By project full path
26+
data "gitlab_project_milestone" "example" {
27+
project_id = "foo/bar"
28+
milestone_id = 10
29+
}
30+
```
31+
32+
<!-- schema generated by tfplugindocs -->
33+
## Schema
34+
35+
### Required
36+
37+
- `milestone_id` (Number) The ID of the project’s milestone in Gitlab DB.
38+
- `project_id` (String) The ID or URL-encoded path of the project owned by the authenticated user.
39+
40+
### Optional
41+
42+
- `id` (String) The ID of this resource.
43+
44+
### Read-Only
45+
46+
- `created_at` (String) The time of creation of the milestone.
47+
- `description` (String) The description of the milestone.
48+
- `due_date` (String) The due date of the milestone.
49+
- `expired` (Boolean) Bool, true if milestore expired.
50+
- `iid` (Number) The ID of the project’s milestone.
51+
- `start_date` (String) The start date of the milestone.
52+
- `state` (String) The state of the milestone. Valid values are: `active`, `closed`.
53+
- `title` (String) The title of a milestone.
54+
- `updated_at` (String) The last update time of the milestone.
55+
- `web_url` (String) The web URL of the milestone.
56+
57+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_project_milestones Data Source - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_project_milestones data source allows details of a project milestones.
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/milestones.html
8+
---
9+
10+
# gitlab_project_milestones (Data Source)
11+
12+
The `gitlab_project_milestones` data source allows details of a project milestones.
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html)
15+
16+
## Example Usage
17+
18+
```terraform
19+
# By project ID
20+
data "gitlab_project_milestones" "example" {
21+
project_id = "12345"
22+
}
23+
24+
# By project full path
25+
data "gitlab_project_milestones" "example" {
26+
project_id = "foo/bar"
27+
}
28+
```
29+
30+
<!-- schema generated by tfplugindocs -->
31+
## Schema
32+
33+
### Required
34+
35+
- `project_id` (String) The ID or URL-encoded path of the project owned by the authenticated user.
36+
37+
### Optional
38+
39+
- `id` (String) The ID of this resource.
40+
- `iids` (List of Number) Return only the milestones having the given `iid` (Note: ignored if `include_parent_milestones` is set as `true`).
41+
- `include_parent_milestones` (Boolean) Include group milestones from parent group and its ancestors. Introduced in GitLab 13.4.
42+
- `search` (String) Return only milestones with a title or description matching the provided string.
43+
- `state` (String) Return only `active` or `closed` milestones.
44+
- `title` (String) Return only the milestones having the given `title`.
45+
46+
### Read-Only
47+
48+
- `milestones` (List of Object) List of milestones from a project. (see [below for nested schema](#nestedatt--milestones))
49+
50+
<a id="nestedatt--milestones"></a>
51+
### Nested Schema for `milestones`
52+
53+
Read-Only:
54+
55+
- `created_at` (String)
56+
- `description` (String)
57+
- `due_date` (String)
58+
- `expired` (Boolean)
59+
- `iid` (Number)
60+
- `milestone_id` (Number)
61+
- `project_id` (String)
62+
- `start_date` (String)
63+
- `state` (String)
64+
- `title` (String)
65+
- `updated_at` (String)
66+
- `web_url` (String)
67+
68+

docs/resources/project_milestone.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "gitlab_project_milestone Resource - terraform-provider-gitlab"
4+
subcategory: ""
5+
description: |-
6+
The gitlab_project_milestone resource allows to manage the lifecycle of a milestone (project).
7+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/milestones.html
8+
---
9+
10+
# gitlab_project_milestone (Resource)
11+
12+
The `gitlab_project_milestone` resource allows to manage the lifecycle of a milestone (project).
13+
14+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html)
15+
16+
## Example Usage
17+
18+
```terraform
19+
# Create a project for the milestone to use
20+
resource "gitlab_project" "example" {
21+
name = "example"
22+
description = "An example project"
23+
namespace_id = gitlab_group.example.id
24+
}
25+
26+
resource "gitlab_project_milestone" "example" {
27+
project_id = gitlab_project.example.id
28+
title = "example"
29+
}
30+
```
31+
32+
<!-- schema generated by tfplugindocs -->
33+
## Schema
34+
35+
### Required
36+
37+
- `project_id` (String) The ID or URL-encoded path of the project owned by the authenticated user.
38+
- `title` (String) The title of a milestone.
39+
40+
### Optional
41+
42+
- `created_at` (String) The time of creation of the milestone.
43+
- `description` (String) The description of the milestone.
44+
- `due_date` (String) The due date of the milestone.
45+
- `id` (String) The ID of this resource.
46+
- `start_date` (String) The start date of the milestone.
47+
- `state` (String) The state of the milestone. Valid values are: `active`, `closed`.
48+
- `updated_at` (String) The last update time of the milestone.
49+
50+
### Read-Only
51+
52+
- `expired` (Boolean) Bool, true if milestore expired.
53+
- `iid` (Number) The ID of the project’s milestone.
54+
- `milestone_id` (Number) The ID of the project’s milestone in Gitlab DB.
55+
- `web_url` (String) The web URL of the milestone.
56+
57+
## Import
58+
59+
Import is supported using the following syntax:
60+
61+
```shell
62+
# Gitlab project milestone can be imported with a key composed of `<project_id>:<milestone_id>`, e.g.
63+
terraform import gitlab_project_milestone.example "12345:11"
64+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# By project ID
2+
data "gitlab_project_milestone" "example" {
3+
project_id = "12345"
4+
milestone_id = 10
5+
}
6+
7+
# By project full path
8+
data "gitlab_project_milestone" "example" {
9+
project_id = "foo/bar"
10+
milestone_id = 10
11+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# By project ID
2+
data "gitlab_project_milestones" "example" {
3+
project_id = "12345"
4+
}
5+
6+
# By project full path
7+
data "gitlab_project_milestones" "example" {
8+
project_id = "foo/bar"
9+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Gitlab project milestone can be imported with a key composed of `<project_id>:<milestone_id>`, e.g.
2+
terraform import gitlab_project_milestone.example "12345:11"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Create a project for the milestone to use
2+
resource "gitlab_project" "example" {
3+
name = "example"
4+
description = "An example project"
5+
namespace_id = gitlab_group.example.id
6+
}
7+
8+
resource "gitlab_project_milestone" "example" {
9+
project_id = gitlab_project.example.id
10+
title = "example"
11+
}

internal/provider/data_source_gitlab_project_milestone.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
var _ = registerDataSource("gitlab_project_milestone", func() *schema.Resource {
1212
return &schema.Resource{
13-
Description: `The ` + "`gitlab_project_milestone`" + ` data source allows details of a project milestone.
13+
Description: `The ` + "`gitlab_project_milestone`" + ` data source allows details of a project milestone.
1414
1515
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/milestones.html)`,
1616

0 commit comments

Comments
 (0)