Resource

dcloud_machine_image

An image taken from an instance's disk, to launch more like it (machine_image_id of a launch template). The instance must be running or stopped. terraform destroy deregisters it and deletes the snapshot behind it.

Example Usage

resource "dcloud_machine_image" "golden" {
  instance_id = dcloud_instance.builder.id
  name        = "web-golden-2026-11"
  description = "Debian 13 with the web stack"
  tags        = { role = "web" }
}

Schema

Required

  • instance_id (String) The instance to snapshot (i-…), running or stopped Changing it replaces the resource.
  • name (String) A display name. Up to 64 characters. Changing it replaces the resource.

Optional

  • description (String) Free text; omitted: none. Up to 255 characters. Changing it replaces the resource.
  • project (String) The project (its slug) the resource lives in. At create: this, else the provider's project, else Default. Changing it moves the resource and its parts; it is never replaced.
  • tags (Map of String) Tags, key → value. Once set here, only these keys are managed; tags Deutsche Cloud adds itself are left alone.

Read-Only

  • architecture (String) x86_64 or arm64.
  • id (String) The resource's id.
  • os_distribution (String) e.g. ubuntu.
  • os_version (String) e.g. 24.04.
  • root_volume_size_gib (Number) Size of the disk it restores, GiB.
  • state (String) pending while the copy runs, then available (or failed).

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import dcloud_machine_image.golden <image-id>

Generated from the provider's schema.