Change provider structure to best practices from terraform-provider-scaffolding project

At first glance, this change set appears to be quite huge, but actually isn't.

It basically reproduces the best practice provider structure and setup from the terraform-provider-scaffolding project.

The major changes are that:

  • provider code moved from gitlab to internal/provider directory
  • change provider code from gitlab to provider package
  • used scaffolding setup in main.go and provider.go
  • For the test code we don't re-use the Gitlab client from the provider, but I've introduced a testGitlabClient which is separate from the provider Gitlab client.
  • the rest of the changes were all necessary evil

Merge request reports

Loading