github.com/koding/terraform@v0.6.4-0.20170608090606-5d7e0339779d/website/source/docs/providers/gitlab/index.html.markdown (about)

     1  ---
     2  layout: "gitlab"
     3  page_title: "Provider: GitLab"
     4  sidebar_current: "docs-gitlab-index"
     5  description: |-
     6    The GitLab provider is used to interact with GitLab group or user resources.
     7  ---
     8  
     9  # GitLab Provider
    10  
    11  The GitLab provider is used to interact with GitLab group or user resources.
    12  
    13  It needs to be configured with the proper credentials before it can be used.
    14  
    15  Use the navigation to the left to read about the available resources.
    16  
    17  ## Example Usage
    18  
    19  ```hcl
    20  # Configure the GitLab Provider
    21  provider "gitlab" {
    22      token = "${var.gitlab_token}"
    23  }
    24  
    25  # Add a project owned by the user
    26  resource "gitlab_project" "sample_project" {
    27      name = "example"
    28  }
    29  
    30  # Add a hook to the project
    31  resource "gitlab_project_hook" "sample_project_hook" {
    32      project = "${gitlab_project.sample_project.id}"
    33      url = "https://example.com/project_hook"
    34  }
    35  
    36  # Add a deploy key to the project
    37  resource "gitlab_deploy_key" "sample_deploy_key" {
    38      project = "${gitlab_project.sample_project.id}"
    39      title = "terraform example"
    40      key = "ssh-rsa AAAA..."
    41  }
    42  
    43  # Add a group
    44  resource "gitlab_group" "sample_group" {
    45      name = "example"
    46      path = "example"
    47      description = "An example group"
    48  }
    49  
    50  # Add a project to the group - example/example
    51  resource "gitlab_project" "sample_group_project" {
    52      name = "example"
    53      namespace_id = "${gitlab_group.sample_group.id}"
    54  }
    55  ```
    56  
    57  ## Argument Reference
    58  
    59  The following arguments are supported in the `provider` block:
    60  
    61  * `token` - (Optional) This is the GitLab personal access token. It must be provided, but
    62    it can also be sourced from the `GITLAB_TOKEN` environment variable.
    63  
    64  * `base_url` - (Optional) This is the target GitLab base API endpoint. Providing a value is a
    65    requirement when working with GitLab CE or GitLab Enterprise e.g. https://my.gitlab.server/api/v3/.
    66    It is optional to provide this value and it can also be sourced from the `GITLAB_BASE_URL` environment variable.
    67    The value must end with a slash.