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

harbor_group : add ldap_group_dn parameter #331

Merged
merged 2 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/resources/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ The following arguments are supported:

* **group_type** - (Required) 3. Note: group type 3 is OIDC group.

* **ldap_group_dn** - (Optional) The distinguished name of the group within AD/LDAP

## Import
An OIDC group can be imported using the `group id` eg,

Expand Down
7 changes: 4 additions & 3 deletions models/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ var PathGroups = "/usergroups"

//
type GroupBody struct {
Groupname string `json:"group_name,omitempty"`
GroupType int `json:"group_type,omitempty"`
ID int `json:"id,omitempty"`
Groupname string `json:"group_name,omitempty"`
GroupType int `json:"group_type,omitempty"`
LdapGroupDn string `json:"ldap_group_dn,omitempty"`
ID int `json:"id,omitempty"`
}
4 changes: 4 additions & 0 deletions provider/resource_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ func resourceGroup() *schema.Resource {
Type: schema.TypeInt,
Required: true,
},
"ldap_group_dn": {
Type: schema.TypeString,
Optional: true,
},
},
Create: resourceGroupCreate,
Read: resourceGroupRead,
Expand Down