forked from AmpereComputing/terraform-oci-ampere-a1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoraclelinux79.tf
29 lines (24 loc) · 871 Bytes
/
oraclelinux79.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This dynamically gets the Oracle Linux 7.9 images, the first result in the images
# list (index 0) is the latest patched version. Filter to specific display name
# pattern to include the aarch64 images
data "oci_core_images" "oraclelinux-7_9-aarch64" {
compartment_id = var.tenancy_ocid
operating_system = "Oracle Linux"
operating_system_version = "7.9"
# include Aarch64 specific images
filter {
name = "display_name"
values = ["^.*-aarch64-.*$"]
regex = true
}
}
# Output OCI OracleLinux 7.9 Image Name
output "OracleLinux-7_9-aarch64-latest-name" {
value = data.oci_core_images.oraclelinux-7_9-aarch64.images.0.display_name
sensitive = false
}
# Output OCI OracleLinux 7.9 Image ID
output "OracleLinux-7_9-aarch64-latest_ocid" {
value = data.oci_core_images.oraclelinux-7_9-aarch64.images.0.id
sensitive = false
}