|
| 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 project milestone. |
| 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 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 | +# 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 = gitlab_project.example.id |
| 28 | + title = "example" |
| 29 | +} |
| 30 | +``` |
| 31 | + |
| 32 | +<!-- schema generated by tfplugindocs --> |
| 33 | +## Schema |
| 34 | + |
| 35 | +### Required |
| 36 | + |
| 37 | +- `project` (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 | +- `description` (String) The description of the milestone. |
| 43 | +- `due_date` (String) The due date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11. |
| 44 | +- `start_date` (String) The start date of the milestone. Date time string in the format YYYY-MM-DD, for example 2016-03-11. |
| 45 | +- `state` (String) The state of the milestone. Valid values are: `active`, `closed`. |
| 46 | + |
| 47 | +### Read-Only |
| 48 | + |
| 49 | +- `created_at` (String) The time of creation of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. |
| 50 | +- `expired` (Boolean) Bool, true if milestore expired. |
| 51 | +- `id` (String) The ID of this resource. |
| 52 | +- `iid` (Number) The ID of the project's milestone. |
| 53 | +- `milestone_id` (Number) The instance-wide ID of the project’s milestone. |
| 54 | +- `project_id` (Number) The project ID of milestone. |
| 55 | +- `updated_at` (String) The last update time of the milestone. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. |
| 56 | +- `web_url` (String) The web URL of the milestone. |
| 57 | + |
| 58 | +## Import |
| 59 | + |
| 60 | +Import is supported using the following syntax: |
| 61 | + |
| 62 | +```shell |
| 63 | +# Gitlab project milestone can be imported with a key composed of `<project>:<milestone_id>`, e.g. |
| 64 | +terraform import gitlab_project_milestone.example "12345:11" |
| 65 | +``` |
0 commit comments