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

Group not found #109

Closed
agardnerIT opened this issue Nov 16, 2023 · 4 comments
Closed

Group not found #109

agardnerIT opened this issue Nov 16, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@agardnerIT
Copy link

agardnerIT commented Nov 16, 2023

I have manually created a group and even setting this, crossplane doesn't seem to find it.

Using provider v0.5.0 on crossplane v1.4.1

apiVersion: groups.gitlab.crossplane.io/v1alpha1
kind: Member
metadata:
  name: user1
spec:
  forProvider:
    groupdId: 5
    groupIdRef:
      name: manualgroup1
    userID: 100
    userName: user1
    accessLevel: 50
  providerConfigRef:
    name: gitlab-provider
  writeConnectionSecretToRef:
    name: gitlab-group-user1
    namespace: crossplane

Resulting error:

cannot resolve references: spec.forProvider.groupId: cannot get referenced resource: Group.groups.gitlab.crossplane.io "manualgroup1" not found
image
@agardnerIT agardnerIT added the bug Something isn't working label Nov 16, 2023
@janwillies
Copy link
Collaborator

You get that error because you are referencing a group which doesn't exist in crossplane (via groupIdRef). You need to import the GitLab group via the external-name annotation. See here: https://docs.crossplane.io/knowledge-base/guides/import-existing-resources/

@dvgitit
Copy link

dvgitit commented Dec 22, 2023

@janwillies

You get that error because you are referencing a group which doesn't exist in crossplane (via groupIdRef). You need to import the GitLab group via the external-name annotation. See here: https://docs.crossplane.io/knowledge-base/guides/import-existing-resources/

For the gitlab provider this does not seem to work. For example for importing a parent group. In the referenced docs for the manual import isn't there a missing reference to a provider config?

@janwillies
Copy link
Collaborator

This is a crossplane convention: when no providerconfig is specified, the one with the name default is chosen

@MisterMX
Copy link
Collaborator

Closing since this issue seemed to be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants