» gitlab_project

This resource allows you to create and manage projects within your GitLab group or within your user.

» Example Usage

resource "gitlab_project" "example" {
  name        = "example"
  description = "My awesome codebase"

  visibility_level = "public"
}

» Argument Reference

The following arguments are supported:

» Attributes Reference

The following additional attributes are exported:

  • id - Integer that uniquely identifies the project within the gitlab install.

  • 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.

  • runners_token - Registration token to use during runner setup.

  • shared_with_groups - List of the groups the project is shared with.

  • remove_source_branch_after_merge - Enable Delete source branch option by default for all new merge requests.

» Importing projects

You can import a project state using terraform import <resource> <id>. The id can be whatever the get single project api takes for its :id value, so for example:

terraform import gitlab_project.example richardc/example