selectel_iam_group_v1
These instructions are a copy of the Terraform provider's Selectel Terraform documentation in the Terraform Registry.
Creates and manages a user group for Selectel products using public API v1.Selectel products support Identity and Access Management (IAM).For more information about user groups, see the official Selectel documentation.
Example Usage
resource "selectel_iam_group_v1" "group_1" {
name = "My group"
description = "My test group"
role {
role_name = "member"
scope = "account"
}
}
Argument Reference
-
name— (Required) Group name. -
description— (Optional) Group description. -
role— (Optional) Manages group roles. You can add multiple roles — each role in a separate block. For more information about roles, see the Roles section.-
role_name— (Required) Role name. Available role names areiam_admin,member,reader,billing,object_storage:admin, andobject_storage_user. -
scope— (Required) Scope of the role. Available scopes areaccountandproject. Ifscopeisprojecttheproject_idargument is required. -
project_id— (Optional) Unique identifier of the associated project. Ifscopeisproject, theproject_idargument is required. Retrieved from the selectel_vpc_project_v2 resource. Learn more about Projects.
-
Roles
To assign roles, use the following values for scope and role_name:
-
Account administrator —
scopeisaccount,role_nameismember. -
Billing administrator —
scopeisaccount,role_nameisbilling. -
User administrator —
scopeisaccount,role_nameisiam_admin. -
Project administrator —
scopeisproject,role_nameismember. -
Account viewer —
scopeisaccount,role_nameisreader. -
Project viewer —
scopeisproject,role_nameisreader. -
Object storage admin —
scopeisproject,role_nameisobject_storage:admin. -
Object storage user —
scopeisproject,role_nameisobject_storage_user.
Import
You can import a group:
export OS_DOMAIN_NAME=<account_id>
export OS_USERNAME=<username>
export OS_PASSWORD=<password>
terraform import selectel_iam_group_v1.group_1 <group_id>
where:
-
<account_id>— Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration. -
<username>— Name of the service user. To get the name, in the Control panel, go to Identity & Access Management ⟶ User management ⟶ the Service users tab ⟶ copy the name of the required user. Learn more about [Service Users](/users-and-roles/access-management/ -
<password>— Password of the service user. -
<group_id>— Unique identifier of the group, for example,abc1bb378ac84e1234b869b77aadd2ab. To get the group ID, use either iam-go or IAM API.