All Projects → gitlabhq → Terraform Provider Gitlab

gitlabhq / Terraform Provider Gitlab

Licence: other
Terraform GitLab provider

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Terraform Provider Gitlab

Terraform Provider Rancher2
Terraform Rancher2 provider
Stars: ✭ 129 (-37.07%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Stripe
A Terraform Provider for Stripe
Stars: ✭ 143 (-30.24%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Docker
As part of our introduction to self-service publishing in the Terraform Registry, this copy of the provider has been archived, and ownership has been transferred to active maintainers in the community. Please see the new location on the Terraform Registry: https://registry.terraform.io/providers/kreuzwerker/docker/latest
Stars: ✭ 131 (-36.1%)
Mutual labels:  terraform, terraform-provider
Cluster.dev
Kubernetes-based Dev Environments with GitOps
Stars: ✭ 122 (-40.49%)
Mutual labels:  terraform, gitlab
Terraform Provider Hcloud
Terraform provider for Hetzner Cloud
Stars: ✭ 138 (-32.68%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Google Beta
Terraform Google Cloud Platform Beta provider
Stars: ✭ 123 (-40%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Sentry
Terraform provider for Sentry
Stars: ✭ 183 (-10.73%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Zerotier
Create, modify and destroy ZeroTier networks and members through Terraform.
Stars: ✭ 113 (-44.88%)
Mutual labels:  terraform, terraform-provider
Terraform Plugin Sdk
Terraform Plugin SDK enables building plugins (providers) to manage any service providers or custom in-house solutions
Stars: ✭ 201 (-1.95%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Shell
Terraform provider for executing shell commands and saving output to state file
Stars: ✭ 172 (-16.1%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Grafana
Terraform Grafana provider
Stars: ✭ 118 (-42.44%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Kubectl
Terraform provider to handle raw kubernetes manifest yaml files
Stars: ✭ 174 (-15.12%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Template
Terraform template provider
Stars: ✭ 119 (-41.95%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Mongodbatlas
Terraform provider for MongoDB Atlas
Stars: ✭ 126 (-38.54%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Databricks
Databricks Terraform Provider
Stars: ✭ 119 (-41.95%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Scaffolding
Quick start repository for creating a Terraform provider
Stars: ✭ 129 (-37.07%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Pagerduty
Terraform PagerDuty provider
Stars: ✭ 106 (-48.29%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Okta
🎉 Now an official Terraform provider! 🚚 We've moved to https://github.com/terraform-providers/terraform-provider-okta/
Stars: ✭ 111 (-45.85%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Lxd
LXD Resource provider for Terraform
Stars: ✭ 164 (-20%)
Mutual labels:  terraform, terraform-provider
Terraform Provider Vultr
Terraform Vultr Provider
Stars: ✭ 172 (-16.1%)
Mutual labels:  terraform, terraform-provider

Terraform Provider for Gitlab

Requirements

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

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

  1. Clone the git repository.

    $ git clone [email protected]:gitlabhq/terraform-provider-gitlab
    $ cd terraform-provider-gitlab
    
  2. Build the provider with make build. This will build the provider and put the provider binary in the $GOPATH/bin directory.

    $ make build
    

Running Tests

The acceptance tests can run against a Gitlab instance where you have a token with administrator permissions (likely not gitlab.com).

Option 1: Run tests against a local Gitlab container with docker-compose

This option is the easiest and requires docker-compose (version 1.13+) to be installed on your machine.

  1. Start the Gitlab container. It will take about 5 minutes for the container to become healthy.
$ make testacc-up
  1. Run the acceptance tests. The full suite takes 10-20 minutes to run.
$ make testacc
  1. Stop the Gitlab container.
$ make testacc-down

Option 2: Run tests against your own Gitlab instance

If you have your own hosted Gitlab instance, you can run the tests against it directly.

$ make testacc GITLAB_TOKEN=example123 GITLAB_BASE_URL=https://example.com/api/v4

GITLAB_TOKEN must be a valid token for an account with admin privileges.

Testing Tips

  • Gitlab Community Edition and Gitlab Enterprise 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 example of this for gitlab_project_level_mr_approvals tests.

  • Run EE tests:

    If you have a Gitlab-license.txt you can run Gitlab EE, which will enable the full suite of tests:

    $ make testacc-up SERVICE=gitlab-ee
    
  • Run a single test:

    You can pass a pattern to the RUN variable to run a reduced number of tests. For example:

    $ make testacc RUN=TestAccGitlabGroup
    

    ...will run all tests for the gitlab_group resource.

  • Debug a test in an IDE:

    First start the Gitlab container with make testacc-up. Then run the desired Go test as you would normally from your IDE, but configure your run configuration to set these environment variables:

    GITLAB_TOKEN=ACCTEST
    GITLAB_BASE_URL=http://127.0.0.1:8080/api/v4
    TF_ACC=1
    
  • Useful HashiCorp documentation:

    Refer to HashiCorp's testing guide and HashiCorp's testing best practices.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].