Skip to content

Commit

Permalink
Merge pull request #174 from sshota0809/issue/173
Browse files Browse the repository at this point in the history
Implement import feature to harbor_project_member_user and harbor_project_member_group module
  • Loading branch information
wrighbr authored Dec 14, 2021
2 parents c26a662 + 52d3b1c commit 37583c4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/resources/project_member_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ The following arguments are supported:

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

`NOTE: oidc group type can only be used with harbor version v1.10.1 and above`
`NOTE: oidc group type can only be used with harbor version v1.10.1 and above`

## Import
Harbor project member group can be imported using the `project id` and `member id` eg,

`
terraform import harbor_project_member_group.main /projects/10/members/200
`
7 changes: 7 additions & 0 deletions docs/resources/project_member_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ The following arguments are supported:
* **project_id** - (Required) The project id of the project that the entity will have access to.

* **role** - (Required) The premissions that the entity will be granted.

## Import
Harbor project member user can be imported using the `project id` and `member id` eg,

`
terraform import harbor_project_member_user.main /projects/10/members/200
`
3 changes: 3 additions & 0 deletions provider/resource_project_member_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ func resourceMembersGroup() *schema.Resource {
Read: resourceMembersGroupRead,
Update: resourceMembersGroupUpdate,
Delete: resourceMembersGroupDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
}
}

Expand Down
3 changes: 3 additions & 0 deletions provider/resource_project_member_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ func resourceMembersUser() *schema.Resource {
Read: resourceMembersUserRead,
Update: resourceMembersUserUpdate,
Delete: resourceMembersUserDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
}
}

Expand Down

0 comments on commit 37583c4

Please sign in to comment.