Securely providing a password to an initialization script
Written by
Updated at September 21, 2026
You can use an initialization script when creating a Windows VM. Such a script may contain the administrator’s and other users’ logins and passwords. To protect sensitive data, use Yandex Lockbox features and Yandex Key Management Service keys rather than specifying the credentials directly in the script.
In this tutorial, you will create a Windows VM using an initialization script which retrieves usernames and passwords from Yandex Lockbox.
You can create a Windows VM while protecting sensitive information in the initialization script using one of the following tools:
- Management console, CLI, API: Create your infrastructure step by step from the Yandex Cloud management console, CLI, or API.
- Terraform: Streamline creating and managing your resources with the infrastructure as code (IaC) approach. Download a Terraform configuration example from the GitHub repository and then deploy your infrastructure using the Yandex Cloud Terraform provider.