Skip to content

Commit 3faa449

Browse files
committed
Fix error 2
1 parent bd37880 commit 3faa449

File tree

9 files changed

+18
-17
lines changed

9 files changed

+18
-17
lines changed

docs/data-sources/project_milestone.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ The `gitlab_project_milestone` data source allows get details of a project miles
1818
```terraform
1919
# By project ID
2020
data "gitlab_project_milestone" "example" {
21-
project_id = "12345"
21+
project = "12345"
2222
milestone_id = 10
2323
}
2424
2525
# By project full path
2626
data "gitlab_project_milestone" "example" {
27-
project_id = "foo/bar"
27+
project = "foo/bar"
2828
milestone_id = 10
2929
}
3030
```
@@ -35,7 +35,7 @@ data "gitlab_project_milestone" "example" {
3535
### Required
3636

3737
- `milestone_id` (Number) The instance-wide ID of the project’s milestone.
38-
- `project_id` (Number) The project ID of milestone.
38+
- `project` (String) The ID or URL-encoded path of the project owned by the authenticated user.
3939

4040
### Read-Only
4141

@@ -45,7 +45,7 @@ data "gitlab_project_milestone" "example" {
4545
- `expired` (Boolean) Bool, true if milestore expired.
4646
- `id` (String) The ID of this resource.
4747
- `iid` (Number) The ID of the project's milestone.
48-
- `project` (String) The ID or URL-encoded path of the project owned by the authenticated user.
48+
- `project_id` (Number) The project ID of milestone.
4949
- `start_date` (String) The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
5050
- `state` (String) The state of the milestone. Valid values are: `active`, `closed`.
5151
- `title` (String) The title of a milestone.

docs/data-sources/project_milestones.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ The `gitlab_project_milestones` data source allows get details of a project mile
1818
```terraform
1919
# By project ID
2020
data "gitlab_project_milestones" "example" {
21-
project_id = "12345"
21+
project = "12345"
2222
}
2323
2424
# By project full path
2525
data "gitlab_project_milestones" "example" {
26-
project_id = "foo/bar"
26+
project = "foo/bar"
2727
}
2828
```
2929

docs/resources/project_milestone.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ resource "gitlab_project" "example" {
2424
}
2525
2626
resource "gitlab_project_milestone" "example" {
27-
project_id = gitlab_project.example.id
28-
title = "example"
27+
project = gitlab_project.example.id
28+
title = "example"
2929
}
3030
```
3131

@@ -60,6 +60,6 @@ resource "gitlab_project_milestone" "example" {
6060
Import is supported using the following syntax:
6161

6262
```shell
63-
# Gitlab project milestone can be imported with a key composed of `<project_id>:<milestone_id>`, e.g.
63+
# Gitlab project milestone can be imported with a key composed of `<project>:<milestone_id>`, e.g.
6464
terraform import gitlab_project_milestone.example "12345:11"
6565
```
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# By project ID
22
data "gitlab_project_milestone" "example" {
3-
project_id = "12345"
3+
project = "12345"
44
milestone_id = 10
55
}
66

77
# By project full path
88
data "gitlab_project_milestone" "example" {
9-
project_id = "foo/bar"
9+
project = "foo/bar"
1010
milestone_id = 10
1111
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# By project ID
22
data "gitlab_project_milestones" "example" {
3-
project_id = "12345"
3+
project = "12345"
44
}
55

66
# By project full path
77
data "gitlab_project_milestones" "example" {
8-
project_id = "foo/bar"
8+
project = "foo/bar"
99
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Gitlab project milestone can be imported with a key composed of `<project_id>:<milestone_id>`, e.g.
1+
# Gitlab project milestone can be imported with a key composed of `<project>:<milestone_id>`, e.g.
22
terraform import gitlab_project_milestone.example "12345:11"

examples/resources/gitlab_project_milestone/resource.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ resource "gitlab_project" "example" {
66
}
77

88
resource "gitlab_project_milestone" "example" {
9-
project_id = gitlab_project.example.id
10-
title = "example"
9+
project = gitlab_project.example.id
10+
title = "example"
1111
}

internal/provider/data_source_gitlab_project_milestones.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ var _ = registerDataSource("gitlab_project_milestones", func() *schema.Resource
2626
Description: "The ID or URL-encoded path of the project owned by the authenticated user.",
2727
Type: schema.TypeString,
2828
Required: true,
29+
ForceNew: true,
2930
},
3031
"iids": {
3132
Description: "Return only the milestones having the given `iid` (Note: ignored if `include_parent_milestones` is set as `true`).",

internal/provider/data_source_gitlab_project_milestones_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func TestAccDataGitlabProjectMilestones_basic(t *testing.T) {
2121
{
2222
Config: fmt.Sprintf(`
2323
data "gitlab_project_milestones" "this" {
24-
project_id = "%d"
24+
project = "%d"
2525
}`, testProject.ID),
2626
Check: resource.ComposeTestCheckFunc(
2727
resource.TestCheckResourceAttr("data.gitlab_project_milestones.this", "milestones.#", fmt.Sprintf("%d", len(testMilestones))),

0 commit comments

Comments
 (0)