2016-10-19 16:25:12 +02:00
|
|
|
---
|
|
|
|
layout: "gitlab"
|
|
|
|
page_title: "GitLab: gitlab_project"
|
2017-05-27 14:50:06 +02:00
|
|
|
sidebar_current: "docs-gitlab-resource-project-x"
|
2016-10-19 16:25:12 +02:00
|
|
|
description: |-
|
2017-05-31 20:00:45 +02:00
|
|
|
Creates and manages projects within GitLab groups or within your user
|
2016-10-19 16:25:12 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
# gitlab\_project
|
|
|
|
|
|
|
|
This resource allows you to create and manage projects within your
|
2017-05-31 20:00:45 +02:00
|
|
|
GitLab group or within your user.
|
2016-10-19 16:25:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
## Example Usage
|
|
|
|
|
2017-04-26 19:44:05 +02:00
|
|
|
```hcl
|
2017-05-29 16:04:51 +02:00
|
|
|
resource "gitlab_project" "example" {
|
2016-10-19 16:25:12 +02:00
|
|
|
name = "example"
|
|
|
|
description = "My awesome codebase"
|
|
|
|
|
2017-05-29 16:04:51 +02:00
|
|
|
visibility_level = "public"
|
2016-10-19 16:25:12 +02:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Argument Reference
|
|
|
|
|
|
|
|
The following arguments are supported:
|
|
|
|
|
|
|
|
* `name` - (Required) The name of the project.
|
|
|
|
|
2017-05-31 20:00:45 +02:00
|
|
|
* `namespace_id` - (Optional) The namespace (group or user) of the project. Defaults to your user.
|
2017-05-29 16:04:51 +02:00
|
|
|
See [`gitlab_group`](group.html) for an example.
|
|
|
|
|
2017-05-31 20:00:45 +02:00
|
|
|
* `description` - (Optional) A description of the project.
|
|
|
|
|
2016-10-19 16:25:12 +02:00
|
|
|
* `default_branch` - (Optional) The default branch for the project.
|
|
|
|
|
|
|
|
* `issues_enabled` - (Optional) Enable issue tracking for the project.
|
|
|
|
|
|
|
|
* `merge_requests_enabled` - (Optional) Enable merge requests for the project.
|
|
|
|
|
|
|
|
* `wiki_enabled` - (Optional) Enable wiki for the project.
|
|
|
|
|
|
|
|
* `snippets_enabled` - (Optional) Enable snippets for the project.
|
|
|
|
|
2017-05-25 08:51:42 +02:00
|
|
|
* `visibility_level` - (Optional) Set to `public` to create a public project.
|
2016-10-19 16:25:12 +02:00
|
|
|
Valid values are `private`, `internal`, `public`.
|
|
|
|
Repositories are created as private by default.
|
|
|
|
|
|
|
|
## Attributes Reference
|
|
|
|
|
|
|
|
The following additional attributes are exported:
|
|
|
|
|
2017-05-29 16:04:51 +02:00
|
|
|
* `id` - Integer that uniquely identifies the project within the gitlab install.
|
|
|
|
|
2016-10-19 16:25:12 +02:00
|
|
|
* `ssh_url_to_repo` - URL that can be provided to `git clone` to clone the
|
|
|
|
repository via SSH.
|
|
|
|
|
|
|
|
* `http_url_to_repo` - URL that can be provided to `git clone` to clone the
|
|
|
|
repository via HTTP.
|
|
|
|
|
|
|
|
* `web_url` - URL that can be used to find the project in a browser.
|