Перейти к содержимому

Резервная копия (backup) диска

terraform
resource "mws_compute_disk" "source_disk" {
disk = var.source_disk_name
disk_type = var.disk_type
iops = 1000
size = "10GB"
}
resource "mws_compute_disk_backup" "backup" {
disk_backup = var.backup_name
source = {
disk = {
id = mws_compute_disk.source_disk.id
}
}
metadata = {
description = "Backup of test disk"
display_name = "Test Disk Backup"
}
}
variable "source_disk_name" {
type = string
default = "test-source-disk"
description = "Source disk name"
}
variable "backup_name" {
type = string
default = "test-disk-backup"
description = "Backup name"
}
variable "disk_type" {
type = string
default = "diskTypes/nbs-pl2"
description = "Disk type"
}
  • disk_backup (String) Путь к резервной копии диска
  • source (Attributes) Источник для создания резервной копии диска (На текущий момент поддерживается только диск, но в будущем будут и другие источники) (see below for nested schema)
  • kind (String) Тип объекта (diskBackup)
  • metadata (Attributes) Дополнительная информация об объекте (see below for nested schema)
  • os_type (String) Тип операционной системы
  • project (String) Путь к проекту
  • timeouts (Attributes) (see below for nested schema)
  • id (String) The ID of this resource.
  • status (Attributes) Статус глобальной резервной копии диска (see below for nested schema)

Optional:

  • disk (Attributes) Диск как источник для резервной копии (see below for nested schema)

Required:

  • id (String) ID диска-источника

Optional:

  • description (String) Описание ресурса
  • display_name (String) Отображаемое имя свойства
  • name (String, Deprecated) Обязательное уникальное, глобально или в пределах проекта, имя. Используется в качестве части составного идентификатора объекта.

Read-Only:

  • create_time (String) Дата создания объекта
  • delete_time (String) Время запроса на удаление ресурса
  • id (String) ID свойства
  • purge_time (String) Время удаления ресурса
  • usages (Attributes List) Связи с другими ресурсами. В зависимости от типа связи, операции над ресурсом могут быть ограничены (see below for nested schema)

Read-Only:

  • name (String) Имя связи, требуется для модификации коллекции
  • resource (String) Ссылка на ресурс
  • usage_type (String) Тип связи. Помимо стандартных own и use могут быть добавлены специализированные типы для конкретных сервисов

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as ”30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as ”30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as ”30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).

Read-Only:

  • initial_source_image (String) Ссылка на исходный образ
  • min_disk_size (String) Минимальный допустимый размер диска, создаваемого из резервной копии диска
  • os_type (String) Тип операционной системы
  • progress (String) Прогресс готовности резервной копии диска в процентах, с точностью до сотых
  • ready (Attributes) Информация о статусе реконсиляции (see below for nested schema)
  • source_exists (Boolean) Признак, указывающий, удален ли родительский ресурс-источник
  • storage_size (String) Размер резервной копии диска

Read-Only:

  • message (String) Описание статуса
  • state (String) Состояние ресурса