Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • 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
  • Schema
  • Optional
  • Read-Only
  1. Terraform reference
  2. Resources
  3. Identity and Access Management (IAM)
  4. Data Sources
  5. iam_role

yandex_iam_role (Data Source)

Written by
Yandex Cloud
Updated at August 7, 2025
  • Example usage
  • Schema
    • Optional
    • Read-Only

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"
    ]
  }
}

SchemaSchema

OptionalOptional

  • description (String)
  • role_id (String)

Read-OnlyRead-Only

  • id (String) The ID of this resource.

Was the article helpful?

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