Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
Sometimes we just want to launch an instance with the latest available image for a particular operating system, without having to check the exact OCID for each region on OCI Images documentation
Module user should be able to just indicate something like this: "use latest Oracle Linux 7.9 image matching my shape and region".
Additionally, we could potentially make the retrieved image OCID permanent so a recreate is not triggered when a newer version is available.
New or Affected Resource(s)
oci_core_instance for the source_id Input Variable.
Potential Terraform Configuration
We need to define a data source, similar to the one below:
Community Note
Description
Sometimes we just want to launch an instance with the latest available image for a particular operating system, without having to check the exact OCID for each region on OCI Images documentation
Module user should be able to just indicate something like this: "use latest Oracle Linux 7.9 image matching my shape and region".
Additionally, we could potentially make the retrieved image OCID permanent so a recreate is not triggered when a newer version is available.
New or Affected Resource(s)
oci_core_instance
for thesource_id
Input Variable.Potential Terraform Configuration
We need to define a data source, similar to the one below:
Then, we can target the image ocid with this expression:
References
Data source: oci_core_images OCI Images OCIDs reference