Skip to content

mws_compute_image (Resource)

Образ диска — шаблон диска с установленной операционной системой (ОС) и предустановленным ПО (опционально), используемый для создания виртуальных машин или других вычислительных ресурсов

Пример использования

terraform
resource "mws_compute_image" "image" {
  image  = var.image_name
  family = var.image_family
  source = {
    external_url = var.image_source_url
  }
}

variable "image_name" {
  type        = string
  default     = "mws-ubuntu-2204-lts-v20250529"
  description = "Image name"
}

variable "image_family" {
  type        = string
  default     = "mws-ubuntu-2204-lts"
  description = "Image family"
}

variable "image_source_url" {
  type        = string
  default     = "https://storage.mwsapis.ru/mws-ubuntu/mws-ubuntu-2204-lts-v20250529.334787.raw"
  description = "Image external source URL"
}

Schema

Required

  • image (String) Путь к образу
  • source (Attributes) Источник для создания образа (see below for nested schema)

Optional

  • activity (String) Актуальность образа
  • family (String) Семейство образа
  • kind (String) Тип объекта (image)
  • metadata (Attributes) Дополнительная информация об объекте (see below for nested schema)
  • min_disk_size (String) Минимальный допустимый размер диска, создаваемого из образа
  • project (String) Путь к проекту
  • timeouts (Attributes) (see below for nested schema)

Read-Only

Nested Schema for source

Optional:

  • disk_id (String) ID диска-источника
  • external_url (String) URL для загрузки образа
  • image_id (String) ID образа-источника

Nested Schema for metadata

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)

Nested Schema for metadata.usages

Read-Only:

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

Nested Schema for timeouts

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).

Nested Schema for status

Read-Only:

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

Nested Schema for status.ready

Read-Only:

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