» yandex_resourcemanager_folder_iam_binding

Allows creation and management of a single binding within IAM policy for an existing Yandex Resource Manager folder.

» Example Usage

data "yandex_resourcemanager_folder" "project1" {
  folder_id = "some_folder_id"
}

resource "yandex_resourcemanager_folder_iam_binding" "admin" {
  folder_id = "${data.yandex_resourcemanager_folder.project1.id}"

  role = "editor"

  members = [
    "userAccount:some_user_id",
  ]
}

» Argument Reference

The following arguments are supported:

  • folder_id - (Required) ID of the folder to attach a policy to.

  • role - (Required) The role that should be assigned. Only one yandex_resourcemanager_folder_iam_binding can be used per role.

  • members - (Required) An array of identities that will be granted the privilege that is specified in the role field. Each entry can have one of the following values:

    • userAccount:{user_id}: An email address that represents a specific Yandex account. For example, ivan@yandex.ru or joe@example.com.
    • serviceAccount:{service_account_id}: A unique service account ID.

» Import

IAM binding imports use space-delimited identifiers; first the resource in question and then the role. These bindings can be imported using the folder_id and role, e.g.

$ terraform import yandex_resourcemanager_folder_iam_binding.viewer "folder_id viewer"