Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • ИИ для бизнеса
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Промоакции и free tier
    • Правила тарификации
  • Истории успеха
  • Документация
  • Блог
Проект Яндекса
© 2025 ООО «Яндекс.Облако»
Terraform в Yandex Cloud
  • Начало работы
  • Библиотека решений
    • Обзор
    • История изменений (англ.)
          • iam_oauth_client
          • iam_policy
          • iam_role
          • iam_service_account
          • iam_service_agent
          • iam_user
          • iam_workload_identity_federated_credential
          • iam_workload_identity_oidc_federation

В этой статье:

  • Example usage
  • Schema
  • Required
  • Read-Only
  • Nested Schema for binding
  1. Справочник Terraform
  2. Ресурсы (англ.)
  3. Identity and Access Management (IAM)
  4. Data Sources
  5. iam_policy

yandex_iam_policy (Data Source)

Статья создана
Yandex Cloud
Обновлена 11 сентября 2025 г.
  • Example usage
  • Schema
    • Required
    • Read-Only
    • Nested Schema for binding

Generates an IAM policy document that may be referenced by and applied to other Yandex Cloud Platform resources, such as the yandex_resourcemanager_folder resource.

This data source is used to define IAM policies to apply to other resources. Currently, defining a policy through a data source and referencing that policy from another resource is the only way to apply an IAM policy to a resource.

Example usageExample usage

//
// Get information about existing IAM Policy.
//
data "yandex_iam_policy" "admin" {
  binding {
    role = "admin"

    members = [
      "userAccount:user_id_1"
    ]
  }

  binding {
    role = "viewer"

    members = [
      "userAccount:user_id_2"
    ]
  }
}

SchemaSchema

RequiredRequired

  • binding (Block Set, Min: 1) Defines a binding to be included in the policy document. Multiple binding arguments are supported. (see below for nested schema)

Read-OnlyRead-Only

  • id (String) The ID of this resource.
  • policy_data (String) The above bindings serialized in a format suitable for referencing from a resource that supports IAM.

Nested Schema for Nested Schema for binding

Required:

  • members (Set of String) An array of identities that will be granted the privilege in the role. Each entry can have one of the following values:
  • userAccount:{user_id}: A unique user ID that represents a specific Yandex account.
  • serviceAccount:{service_account_id}: A unique service account ID.
  • federatedUser:{federated_user_id}:: A unique saml federation user account ID.
  • group:{group_id}: A unique group ID.
  • system:group:federation:{federation_id}:users: All users in federation.
  • system:group:organization:{organization_id}:users: All users in organization.
  • system:allAuthenticatedUsers: All authenticated users.
  • system:allUsers: All users, including unauthenticated ones.

Важно

For more information about system groups, see the documentation.

  • role (String) The role/permission that will be granted to the members. See the IAM Roles documentation for a complete list of roles.

Была ли статья полезна?

Предыдущая
iam_oauth_client
Следующая
iam_role
Проект Яндекса
© 2025 ООО «Яндекс.Облако»