Skip to main content

dtcloud_images (Data Source)

Lists every image visible to the caller.

Every filter is applied by the provider. The endpoint's own visibility parameter only separates public images from the rest: asking it for private returns private, shared and community images together. Filtering here means visibility = "private" returns private images, which is what it says.

Example Usage​

data "dtcloud_images" "private_active" {
visibility = "private"
status = "active"
}

data "dtcloud_images" "ubuntu" {
os_distro = "ubuntu"
}

Schema​

Optional​

  • name (String) Only return images with this exact name. Applied by the provider.
  • os_distro (String) Only return images carrying this distribution. Applied by the provider.
  • status (String) Only return images in this status, e.g. active. Applied by the provider.
  • visibility (String) Only return images with this visibility. Applied by the provider, because the endpoint's own filter only separates public images from the rest.

Read-Only​

  • id (String) The ID of this resource.
  • images (List of Object) The images that matched, in the order the platform returned them. (see below for nested schema)

Nested Schema for images​

Read-Only:

  • id (String)
  • min_disk (Number)
  • name (String)
  • os_distro (String)
  • os_type (String)
  • size (String)
  • status (String)
  • type (String)
  • uefi (Boolean)
  • visibility (String)

Behaviour worth knowing​

  • How the filters match. name must match exactly; os_distro, visibility and status ignore case. The whole list is fetched either way.
  • os_type is filled in here, and not elsewhere. The list endpoint guesses it from os_distro when the platform holds no value. dtcloud_image and the resource read the details endpoint, which makes no such guess, so the same image can report an empty os_type there.