Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • 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
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Terraform in Yandex Cloud
  • Getting started
  • Solution library
    • Overview
    • Release notes
          • lockbox_secret
          • lockbox_secret_iam_binding
          • lockbox_secret_iam_member
          • lockbox_secret_version
          • lockbox_secret_version_hashed

In this article:

  • Example usage
  • Arguments & Attributes Reference
  • Import
  1. Terraform reference
  2. Resources
  3. Lockbox
  4. Resources
  5. lockbox_secret

yandex_lockbox_secret (Resource)

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

Yandex Cloud Lockbox secret resource. For more information, see the official documentation. The created secret will contain a version with the generated password. You can use yandex_lockbox_secret_version to create new versions.

Example usageExample usage

//
// Create a new LockBox Secret.
//
resource "yandex_lockbox_secret" "my_secret" {
  name = "test secret"
}
//
// Create a new LockBox Secret with password.
//
resource "yandex_lockbox_secret" "my_secret" {
  name = "test secret with passowrd"

  password_payload_specification {
    password_key = "some_password"
    length       = 12
  }
}

Arguments & Attributes ReferenceArguments & Attributes Reference

  • created_at (Read-Only) (String). The creation timestamp of the resource.
  • deletion_protection (Bool). The true value means that resource is protected from accidental deletion.
  • description (String). The resource description.
  • folder_id (String). The folder identifier that resource belongs to. If it is not provided, the default provider folder-id is used.
  • id (String).
  • kms_key_id (String). The KMS key used to encrypt the Yandex Cloud Lockbox secret.
  • labels (Map Of String). A set of key/value label pairs which assigned to resource.
  • name (String). The resource name.
  • status (Read-Only) (String). The Yandex Cloud Lockbox secret status.
  • password_payload_specification [Block]. Payload specification for password generation.
    • excluded_punctuation (String). String of punctuation characters to exclude from the default. Requires include_punctuation = true. Default is empty.
    • include_digits (Bool). Use digits in the generated password. Default is true.
    • include_lowercase (Bool). Use lowercase letters in the generated password. Default is true.
    • include_punctuation (Bool). Use punctuations (!"#$%&'()*+,-./:;<=>?@[\]^_~`) in the generated password. Default is true.
    • include_uppercase (Bool). Use capital letters in the generated password. Default is true.
    • included_punctuation (String). String of specific punctuation characters to use. Requires include_punctuation = true. Default is empty.
    • length (Number). Length of generated password. Default is 36.
    • password_key (Required)(String). The key with which the generated password will be placed in the secret version.

ImportImport

The resource can be imported by using their resource ID. For getting it you can use Yandex Cloud Web Console or Yandex Cloud CLI.

# terraform import yandex_lockbox_secret.<resource Name> <resource Id>
terraform import yandex_lockbox_secret.my_secret ...

Was the article helpful?

Previous
lockbox_secret_version
Next
lockbox_secret_iam_binding
© 2026 Direct Cursus Technology L.L.C.