Adding members
-
Log in to Yandex Identity Hub
. -
In the left-hand panel, select
Groups and click the row with the name of the group you need. -
Navigate to the Members tab.
-
Click Add member.
-
In the window that opens, select the users or service accounts. Use search, if required.
-
Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.
-
See the description of the command for adding members to the Yandex Identity Hub user group:
yc organization-manager group add-members --help -
To add members to a user group, run this command:
yc organization-manager group add-members \ --name <group_name> \ --organization-id <organization_ID> \ --subject-id <member_ID>Where:
--name: User group name. This is a required setting.--organization-id: Organization ID.--subject-id: ID of the member to add to the group.
With Terraform
Terraform is distributed under the Business Source License
For more information about the provider resources, see the relevant documentation on the Terraform
If you do not have Terraform yet, install it and configure the Yandex Cloud provider.
-
In the configuration file, describe the new group members:
resource "yandex_organizationmanager_group_membership" "group-members" { group_id = "<group_ID>" members = [ "<member_1_ID>", "<member_2_ID>" ] }Where:
group_id: ID of the group to add the member to.members: IDs of the members to add to the group.
-
Create the resources:
-
In the terminal, navigate to the configuration file directory.
-
Make sure the configuration is correct using this command:
terraform validateIf the configuration is valid, you will get this message:
Success! The configuration is valid. -
Run this command:
terraform planYou will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.
-
Apply the configuration changes:
terraform apply -
Type
yesand press Enter to confirm the changes.
Terraform will create all the required resources. You can check the new resources and their settings in the Cloud Center UI
or using this CLI command:yc organization-manager group list-memebers \ --name <group_name> \ --organization-id <organization_ID> -
Use the Group.updateMembers REST API method for the Group resource or the GroupService/UpdateMembers gRPC API call.