Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitLab Data Group #129

Merged
merged 6 commits into from
May 23, 2019
Merged

Add GitLab Data Group #129

merged 6 commits into from
May 23, 2019

Conversation

matejvelikonja
Copy link
Contributor

This PR adds a new data resource gitlab_group.
You can access GitLab group via group_id or full_path.

Fixes #103

data "gitlab_group" "foo1" {
  full_path = "foo/bar"
}
data "gitlab_group" "foo2" {
  group_id = 123
}

@mkjmdski
Copy link
Contributor

+1

Copy link
Collaborator

@jorcau jorcau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @matejvelikonja.

I think you forgot to edit doc arborescence website/gitlab.erb with the new datasource.

Also, maybe it'd be better to separate group resource changes into another PR to make this one clearer?

gitlab/data_source_gitlab_group.go Outdated Show resolved Hide resolved
@matejvelikonja
Copy link
Contributor Author

not really sure, why would TestAccGitlabProject_basic fail with this changes.

--- FAIL: TestAccGitlabProject_basic (6.06s)
    testing.go:568: Step 1 error: Check failed: Check 2/2 error: 1 error occurred:
        	* Check 5/22 error: attribute tags expected "&{F:0xf04970 m:map[4151227546:tag1 1852302624:tag2] once:{m:{state:0 sema:0} done:1}}" received "&{F:0xf04970 m:map[4151227546:tag1 1852302624:tag2] once:{m:{state:0 sema:0} done:1}}"

and acceptances tests work on my machine. Probably a temporary glitch.

=== RUN   TestAccDataSourceGitlabGroup_basic
--- PASS: TestAccDataSourceGitlabGroup_basic (14.38s)
=== RUN   TestAccDataGitlabProject_basic
--- PASS: TestAccDataGitlabProject_basic (7.86s)
=== RUN   TestAccDataSourceGitlabUser_basic
--- PASS: TestAccDataSourceGitlabUser_basic (1.61s)
=== RUN   TestAccDataSourceGitlabUsers_basic
--- PASS: TestAccDataSourceGitlabUsers_basic (1.62s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestProvider_impl
--- PASS: TestProvider_impl (0.00s)
=== RUN   TestAccGitlabBranchProtection_basic
--- PASS: TestAccGitlabBranchProtection_basic (8.01s)
=== RUN   TestAccGitlabDeployKey_basic
--- PASS: TestAccGitlabDeployKey_basic (8.29s)
=== RUN   TestAccGitlabDeployKey_suppressfunc
--- PASS: TestAccGitlabDeployKey_suppressfunc (6.04s)
=== RUN   TestAccGitlabDeployKey_import
--- PASS: TestAccGitlabDeployKey_import (6.12s)
=== RUN   TestAccGitlabGroupMembership_basic
--- PASS: TestAccGitlabGroupMembership_basic (7.42s)
=== RUN   TestAccGitlabGroup_basic
--- PASS: TestAccGitlabGroup_basic (6.35s)
=== RUN   TestAccGitlabGroup_import
--- PASS: TestAccGitlabGroup_import (5.66s)
=== RUN   TestAccGitlabGroup_nested
--- PASS: TestAccGitlabGroup_nested (27.85s)
=== RUN   TestAccGitlabGroupVariable_basic
--- PASS: TestAccGitlabGroupVariable_basic (6.49s)
=== RUN   TestAccGitlabLabel_basic
--- PASS: TestAccGitlabLabel_basic (8.02s)
=== RUN   TestAccGitlabPipelineTrigger_basic
--- PASS: TestAccGitlabPipelineTrigger_basic (7.46s)
=== RUN   TestAccGitlabProjectCluster_basic
--- PASS: TestAccGitlabProjectCluster_basic (8.17s)
=== RUN   TestAccGitlabProjectCluster_import
--- PASS: TestAccGitlabProjectCluster_import (6.26s)
=== RUN   TestAccGitlabProjectHook_basic
--- PASS: TestAccGitlabProjectHook_basic (7.36s)
=== RUN   TestAccGitlabProjectMembership_basic
--- PASS: TestAccGitlabProjectMembership_basic (7.55s)
=== RUN   TestAccGitlabProject_basic
--- PASS: TestAccGitlabProject_basic (15.43s)
=== RUN   TestAccGitlabProject_import
--- PASS: TestAccGitlabProject_import (6.07s)
=== RUN   TestAccGitlabProject_nestedImport
--- PASS: TestAccGitlabProject_nestedImport (11.45s)
=== RUN   TestAccGitlabProjectVariable_basic
--- PASS: TestAccGitlabProjectVariable_basic (7.01s)
=== RUN   TestAccGitlabServiceSlack_basic
--- PASS: TestAccGitlabServiceSlack_basic (8.46s)
=== RUN   TestAccGitlabServiceSlack_import
--- PASS: TestAccGitlabServiceSlack_import (6.06s)
=== RUN   TestAccGitlabUser_basic
--- PASS: TestAccGitlabUser_basic (1.18s)
=== RUN   TestGitlab_validation
--- PASS: TestGitlab_validation (0.00s)
=== RUN   TestGitlab_visbilityHelpers
--- PASS: TestGitlab_visbilityHelpers (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-gitlab/gitlab	208.217s

@matejvelikonja
Copy link
Contributor Author

@roidelapluie anything else to do here?

@Johnee
Copy link

Johnee commented May 23, 2019

Thanks @matejvelikonja, this feature will be very useful to us, once it gets merged. Hopefully soon..

@ghost ghost added size/XXL and removed size/XL labels May 23, 2019
@ghost ghost added size/XL and removed size/XXL labels May 23, 2019
@roidelapluie
Copy link
Collaborator

This will be released in the coming days. I will merge it soon after 2.0.0 is released.

@roidelapluie roidelapluie merged commit c546240 into gitlabhq:master May 23, 2019
@matejvelikonja matejvelikonja deleted the data-group branch May 23, 2019 23:23
rsrchboy added a commit to rsrchboy/terraform-provider-gitlab that referenced this pull request May 24, 2019
* origin/master:
  Update CHANGELOG.md
  Add GitLab Data Group (gitlabhq#129)
  Cleanup after v2.0.0 release
  v2.0.0
  Update typo
  Update changelog
  Fix Acc tests and move to TF 0.12
  Fix alignment.
  Fix test TestAccGitlabProject_willError.
  Fix tests.
  Add missing func testAccCheckGitlabProjectAttributes SharedRunnersEnabled check. Use GitLab API documentation description of shared_runners_enabled.
  Cleans up "project" resource schema and testing framework
  add domain to project cluster
  Stop silently deleting objects from state
  Add shared_runners_enabled flag in project
@matejvelikonja
Copy link
Contributor Author

matejvelikonja commented May 29, 2019

@roidelapluie any news when version 2.1 will be relased?

@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

Feature Request: data.gitlab_group
5 participants