Yandex Cloud
Документация
ПрезентацияСвязаться с намиНачать бесплатно
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»
Terraform в Yandex Cloud
  • Начало работы
  • Настройка аутентификации Terraform-провайдера Yandex Cloud
  • Вопросы и ответы
  • Библиотека решений
    • Обзор
    • История изменений (англ.)
          • lockbox_secret
          • lockbox_secret_version
          • lockbox_secret_version_entry

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

  • Example usage
  • Arguments & Attributes Reference
  1. Справочник Terraform
  2. Ресурсы (англ.)
  3. Lockbox
  4. Data Sources
  5. lockbox_secret_version_entry

yandex_lockbox_secret_version_entry (DataSource)

Статья создана
Yandex Cloud
Обновлена 23 апреля 2026 г.
Открыть в Markdown
  • Example usage
  • Arguments & Attributes Reference

Get a single entry from a Yandex Cloud Lockbox secret version by key. For more information, see the official documentation.

This data source is a convenience wrapper around yandex_lockbox_secret_version that lets you retrieve a specific entry by key without having to filter the entries list yourself.

If you're creating the secret in the same project, then you should indicate version_id, since otherwise you may refer to a wrong version of the secret (e.g. the first version, when it is still empty).

Example usageExample usage

//
// Get a specific entry from the latest version of a Lockbox secret by key.
//
data "yandex_lockbox_secret_version_entry" "db_password" {
  secret_id = "some-secret-id"
  key       = "db_password"
}

output "db_password" {
  value     = data.yandex_lockbox_secret_version_entry.db_password.text_value
  sensitive = true
}
//
// Get a specific entry from a pinned version of a Lockbox secret by key.
//
resource "yandex_lockbox_secret" "my_secret" {
  # ...
}

resource "yandex_lockbox_secret_version" "my_version" {
  secret_id = yandex_lockbox_secret.my_secret.id
  entries {
    key        = "db_password"
    text_value = "s3cr3t"
  }
  entries {
    key        = "db_user"
    text_value = "admin"
  }
}

data "yandex_lockbox_secret_version_entry" "db_password" {
  secret_id  = yandex_lockbox_secret.my_secret.id
  version_id = yandex_lockbox_secret_version.my_version.id
  key        = "db_password"
}

output "db_password" {
  value     = data.yandex_lockbox_secret_version_entry.db_password.text_value
  sensitive = true
}

Arguments & Attributes ReferenceArguments & Attributes Reference

  • binary_value (Read-Only) (String). The binary value of the entry encoded as a base64 string. Populated when the entry holds binary data. Mutually exclusive with text_value.
  • id (String).
  • key (Required)(String). The key of the entry to retrieve.
  • secret_id (Required)(String). The Yandex Cloud Lockbox secret ID.
  • text_value (Read-Only) (String). The text value of the entry. Populated when the entry holds a UTF-8 string. Mutually exclusive with binary_value.
  • version_id (String). The Yandex Cloud Lockbox secret version ID. If omitted, the current (latest) version is used.

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

Предыдущая
lockbox_secret_version
Следующая
lockbox_secret
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»