No description
  • Go 97.2%
  • HTML 1.5%
  • Shell 0.8%
  • Makefile 0.5%
Find a file
2020-08-12 12:44:13 -04:00
.github Fix the property name to check for the event type. 2020-05-20 13:34:16 +02:00
gitlab Bump go-gitlab to v.0.34.1 (#378) 2020-08-07 14:27:10 -07:00
scripts Fix community PR 2019-10-17 12:45:19 +02:00
vendor Bump go-gitlab to v.0.34.1 (#378) 2020-08-07 14:27:10 -07:00
website Add importer to resource_gitlab_project_push_rules (#360) 2020-08-01 23:54:15 +02:00
.gitattributes Prevent line ending conversion on Windows 2020-03-22 22:47:56 +01:00
.gitignore Adding the acceptance tests for Gitlab EE 2020-04-01 12:07:12 +02:00
.go-version Set Go version to 1.14.1 2020-04-06 11:30:47 +02:00
CHANGELOG.md Cleanup after v2.11.0 release 2020-07-24 10:39:01 +00:00
Gitlab-license.encrypted Adding the acceptance tests for Gitlab EE 2020-04-01 12:07:12 +02:00
GNUmakefile datasource: gitlab_projects 2020-05-28 10:48:16 +02:00
go.mod Bump go-gitlab to v.0.34.1 (#378) 2020-08-07 14:27:10 -07:00
go.sum Bump go-gitlab to v.0.34.1 (#378) 2020-08-07 14:27:10 -07:00
JulienPivotto.gitlab-license.enc Test EE (#188) 2019-10-16 23:45:05 +02:00
LICENSE initial commit 2017-06-05 20:54:14 +00:00
main.go Move to Terraform SDK 2019-10-18 22:51:50 +02:00
README.md Update README.md 2020-08-12 12:44:13 -04:00

THIS PROVIDER IS NOW MAINTAINED BY GITLAB, THE NEW LOCATION IS https://github.com/gitlabhq/terraform-provider-gitlab


Terraform Provider for Gitlab

Requirements

  • Terraform 0.12.x
  • Go >= 1.14 (to build the provider plugin)

Building The Provider

Clone repository to: $GOPATH/src/github.com/terraform-providers/terraform-provider-gitlab

$ mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/terraform-providers
$ git clone git@github.com:terraform-providers/terraform-provider-gitlab

Enter the provider directory and build the provider

$ cd $GOPATH/src/github.com/terraform-providers/terraform-provider-gitlab
$ make build

Using the provider

Fill in for each provider

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.14+ is required).

To compile the provider, run make build. This will build the provider and put the provider binary in the $GOPATH/bin directory.

$ make build
...
$ $GOPATH/bin/terraform-provider-gitlab
...

Running tests

The Terraform Provider only has acceptance tests, these can run against a gitlab instance where you have a token with administrator permissions (likely not gitlab.com). There is excellent documentation on how to run gitlab from docker at gitlab.com

In order to run the full suite of acceptance tests, export the environment variables:

  • GITLAB_TOKEN //token for account with admin priviliges
  • GITLAB_BASE_URL //URL with api part e.g. http://localhost:8929/api/v4/

and run make testacc.

$ make testacc

Gitlab Community Edition and Gitlab Entreprise Edition

This module supports both Gitlab CE and Gitlab EE. We run tests on Gitlab EE, but can't run them on pull requests from forks.

Features that only work on one flavour can use the following helpers as SkipFunc: isRunningInEE and isRunningInCE. You can see an exemple of this for gitlab_project_push_rules tests.