Associating a Yandex Cloud Backup policy to a VM automatically
Written by
Updated at July 9, 2025
You can create a Yandex Compute Cloud virtual machine with an automatically linked backup policy based on a supported Cloud Backup image.
To do this, you need to provide the Cloud Backup agent installation script and the policy ID in the VM metadata. The system automatically associates the specified policy with the VM after the VM and the Cloud Backup agent are up and running.
You can create an infrastructure to automatically associate backup policies with VMs using the following tools:
- Yandex Cloud management console, CLI, and API: Use one of these methods to create your infrastructure step by step.
- 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.