最近更新时间:2019-12-23 17:22:49

This data source provides a list of available image resources based on the availability zone, image ID, and other fields.

Example Usage

# Get ksyun_images
data "ksyun_images" "default" {

Argument Reference

The following arguments are supported:

  • ids - (Optional) A list of image IDs.
  • name_regex - (Optional) A regex string to filter resulting images by name. For example, ^CentOS 7.[1-2] 64 means CentOS 7.1 of 64-bit operating system or CentOS 7.2 of 64-bit operating system; ^Ubuntu 16.04 64 means Ubuntu 16.04 of 64-bit operating system).
  • output_file - (Optional) Name of the file to store data source results output by executing terraform plan.
  • most_recent - (Optional) Boolean type. If more than one result is returned, select the most recent one.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • creation_date - Time of creation.
  • image_id - The ID of the image.
  • image_source - Source of the image. Valid values are import, copy, share, extend, and system.
  • image_state - Status of the image.
  • is_public - Whether or not the image is provided by Ksyun.
  • name - Display name of the image.
  • platform - Platform type of the image system.
  • progress - Progress of image creation.
  • sys_disk - Size of the created disk.