@@ -13,7 +13,7 @@ Lists the available images in the specified compartment, including both
1313[ Oracle-provided images] ( https://docs.cloud.oracle.com/iaas/Content/Compute/References/images.htm ) and
1414[ custom images] ( https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/managingcustomimages.htm ) that have
1515been created. The list of images returned is ordered to first show all
16- Oracle-provided images, then all custom images.
16+ Oracle-provided images, then all custom images. Read more on [ List Images ] ( https://docs.cloud.oracle.com/iaas/api/#/en/iaas/20160918/Image/ListImages )
1717
1818The order of images returned may change when new images are released.
1919
@@ -31,8 +31,11 @@ data "oci_core_images" "test_images" {
3131 operating_system_version = "${var.image_operating_system_version}"
3232 shape = "${var.image_shape}"
3333 state = "${var.image_state}"
34+ sort_by = "${var.image_sort_by}"
35+ sort_order = "${var.image_sort_order}"
3436}
3537```
38+ For more detailed implementation refer the [ image example] ( https://github.com/oracle/terraform-provider-oci/tree/master/examples/compute/image )
3639
3740## Argument Reference
3841
@@ -44,7 +47,8 @@ The following arguments are supported:
4447* ` operating_system_version ` - (Optional) The image's operating system version. Example: ` 7.2 `
4548* ` shape ` - (Optional) Shape name.
4649* ` state ` - (Optional) A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
47-
50+ * ` sort_by ` - (Optional) Sort the resources returned, by creation time or display name. Example ` TIMECREATED ` or ` DISPLAYNAME ` .
51+ * ` sort_order ` - (Optional) The sort order to use, either ascending (` ASC ` ) or descending (` DESC ` ).
4852
4953## Attributes Reference
5054
0 commit comments