diff --git a/docs/resources/project_member_group.md b/docs/resources/project_member_group.md index 87d8e67..fdf111a 100644 --- a/docs/resources/project_member_group.md +++ b/docs/resources/project_member_group.md @@ -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` \ No newline at end of file +`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 +` diff --git a/docs/resources/project_member_user.md b/docs/resources/project_member_user.md index bb3954d..b58c656 100644 --- a/docs/resources/project_member_user.md +++ b/docs/resources/project_member_user.md @@ -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 +` diff --git a/provider/resource_project_member_group.go b/provider/resource_project_member_group.go index a9ff606..8a9b128 100644 --- a/provider/resource_project_member_group.go +++ b/provider/resource_project_member_group.go @@ -64,6 +64,9 @@ func resourceMembersGroup() *schema.Resource { Read: resourceMembersGroupRead, Update: resourceMembersGroupUpdate, Delete: resourceMembersGroupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, } } diff --git a/provider/resource_project_member_user.go b/provider/resource_project_member_user.go index 1bf4af1..4262617 100644 --- a/provider/resource_project_member_user.go +++ b/provider/resource_project_member_user.go @@ -43,6 +43,9 @@ func resourceMembersUser() *schema.Resource { Read: resourceMembersUserRead, Update: resourceMembersUserUpdate, Delete: resourceMembersUserDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, } }