Commit Graph

10 Commits

Author SHA1 Message Date
Richard Clamp 8e25c23c84 provider/gitlab: Documentation improvements (#14824)
* provider/gitlab: Fix documentation copypasta

The original provider and docs were copied from the github provider, one
bit of copy paste slipped unmissed.

* provider/gitlab: Document `gitlab_project#id`

* provider/gitlab: Document `gitlab_project#namespace_id`

* provider/gitlab: Add fuller demonstration to the provider page

Following in the style of other provider pages, add a worked example
showing off all of the available resources offered by the gitlab
provider.

* provider/gitlab: Correct sample for gitlab_project
2017-05-29 17:04:51 +03:00
Julien Pivotto 9ec28d26a8 doc/provider/gitlab: rename github_token to gitlab_token (#14890) 2017-05-28 23:46:44 +03:00
tombuildsstuff 96e5ed1d93 Adding all of the gitlab resources to the sidebar 2017-05-27 13:50:25 +01:00
Martin Atkins f8daafb449 website: correct formatting of gitlab doc preambles 2017-05-25 10:16:02 -07:00
grafjo e6b776fedd Fix gitlab documentation (#14803)
* fix gitlab_project resource documentation

* improve gitlab provider documentation
2017-05-25 07:51:42 +01:00
Richard Clamp 9e90e77be4 provider/gitlab: Add `gitlab_group` resource (#14490)
* vendor: Update go-gitlab to master@e6c11e

Update go-gitlab to master@e6c11e.  This brings in UpdateGroup in
addition to fuller management of other attributes.

* provider/gitlab:  Add `gitlab_group` resource

This adds a gitlab_group resource.

This combined with #14483 will allow you to create projects in a
group.
2017-05-24 13:01:24 +01:00
Richard Clamp 395f1d5bbf provider/gitlab: add `gitlab_deploy_key` (#14734)
* provider/gitlab: add `gitlab_deploy_key`

Here we extend the gitlab provider further by adding a `gitlab_deploy_key`
resource.  This resource allows management of a projects deploy
keys.

* provider/gitlab: Do not test `gitlab_deploy_key` `can_push`

Here we remove the testing of the `can_push` attribute.  This makes the
tests less comprehensive, but will allow them to work with the current
release of gitlab-ce.

This change is staged as a distinct commit so it can be easily
dropped/reverted once gitlab MR !11607 has reached a released state.

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11607

* provider/gitlab: Update docs for gitlab_deploy_key/can_push

Note that the can_push attribute of gitlab_deploy_key doesn't currently
work.  This note can be removed once
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11607 is merged
and in general circulation.
2017-05-24 11:41:40 +01:00
Richard Clamp dcbe8a4736 provider/gitlab: add gitlab_project_hook resource
Here we add a new resource type `gitlab_project_hook`.  It allows for
management of custom hooks for a gitlab project.

This is a relatively simple resource as a project hook is a simple
association between a project, and a url to hit when one of the flagged
events occurs on that project.

Hooks (called Webhooks in some user documentation, but simply Hooks
in the api documentation) are covered here for users
https://docs.gitlab.com/ce/user/project/integrations/webhooks.html and
in the API documentation at
https://docs.gitlab.com/ce/api/projects.html#hooks
2017-05-03 11:51:53 +01:00
stack72 fd48f91876
provider/gitlab: Addition of the documentation link for gitlab to sidebar
```
% make testacc TEST=./builtin/providers/gitlab
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/27 05:37:02 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/gitlab -v  -timeout 120m
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccGitlabProject_basic
--- PASS: TestAccGitlabProject_basic (41.11s)
=== RUN   TestGitlab_validation
--- PASS: TestGitlab_validation (0.00s)
=== RUN   TestGitlab_visbilityHelpers
--- PASS: TestGitlab_visbilityHelpers (0.00s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/gitlab	41.125s
```
2017-04-27 05:44:05 +12:00
Richard Clamp 631b0b865c provider/gitlab: add gitlab provider and `gitlab_project` resource
Here we add a basic provider with a single resource type.

It's copied heavily from the `github` provider and `github_repository`
resource, as there is some overlap in those types/apis.

~~~
resource "gitlab_project" "test1" {
  name = "test1"
  visibility_level = "public"
}
~~~

We implement in terms of the
[go-gitlab](https://github.com/xanzy/go-gitlab) library, which provides
a wrapping of the [gitlab api](https://docs.gitlab.com/ee/api/)

We have been a little selective in the properties we surface for the
project resource, as not all properties are very instructive.
Notable is the removal of the `public` bool as the `visibility_level`
will take precedent if both are supplied which leads to confusing
interactions if they disagree.
2017-04-24 11:38:20 +01:00