Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Setting up Yandex Cloud Terraform provider authentication
  • Solution library
    • Overview
    • Release notes
          • 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

In this article:

  • Example usage
  • Arguments & Attributes Reference
  1. Terraform reference
  2. Resources
  3. Identity and Access Management
  4. Data Sources
  5. iam_role

yandex_iam_role (DataSource)

Written by
Yandex Cloud
Updated at February 9, 2026
View as Markdown
  • Example usage
  • Arguments & Attributes Reference

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 usageExample usage

//
// Get information about existing IAM Role.
//
data "yandex_iam_role" "admin" {
  binding {
    role = "admin"

    members = [
      "userAccount:user_id_1"
    ]
  }
}

Arguments & Attributes ReferenceArguments & Attributes Reference

  • description (String).
  • id (String).
  • role_id (String).

Was the article helpful?

Previous
iam_policy
Next
iam_service_account
© 2026 Direct Cursus Technology L.L.C.