yandex_iam_role (Data Source)
Статья создана
Обновлена 7 августа 2025 г.
Generates an IAM role document that may be referenced by and applied to other Yandex Cloud Platform resources, such as the yandex_resourcemanager_folder resource. For more information, see the official documentation.
This data source is used to define IAM roles in order to apply them to other resources. Currently, defining a role through a data source and referencing that role from another resource is the only way to apply an IAM role to a resource.
Example usage
//
// Get information about existing IAM Role.
//
data "yandex_iam_role" "admin" {
binding {
role = "admin"
members = [
"userAccount:user_id_1"
]
}
}
Schema
Optional
description(String)role_id(String)
Read-Only
id(String) The ID of this resource.