goharbor/terraform-provider-harbor

harbor_group ldap - Group DN is not found

HSoulat opened this issue · 2 comments

Describe the bug
Group DN is not found during apply.

To Reproduce

resource "harbor_group" "admin" {
  group_name = "Harbor_Group"
  group_type = 1
  ldap_group_dn = "cn=harbor_group,ou=groups,dc=sample,dc=local"
}

Expected behavior
Resource should find and create group correctly.

User group creation is working well trough an API call.

curl -X 'POST' \
  'https://harbor.sample.local/api/v2.0/usergroups' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'X-Harbor-CSRF-Token: token' \
  -d '{
  "group_name": "Harbor_Group",
  "ldap_group_dn": "cn=harbor_group,ou=groups,dc=sample,dc=local",
  "group_type": 1,
  "id": 0
}'

Additional context
Add any other context about the problem here.

  • Provider Version : v3.9.3
  • Terraform Version : v1.4.6
  • Harbor Version : v2.8.2-d4c34dcc
flbla commented

Hi @HSoulat, thanks for the bug report
I fixed it with #348

flbla commented

fix in : v3.9.4