forked from AmpereComputing/terraform-oci-ampere-a1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathubuntu2204.tf
28 lines (23 loc) · 837 Bytes
/
ubuntu2204.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
# gets the Ubuntu 22.04 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" "ubuntu-22_04-aarch64" {
compartment_id = var.tenancy_ocid
operating_system = "Canonical Ubuntu"
operating_system_version = "22.04"
# include Aarch64 specific images
filter {
name = "display_name"
values = ["^.*-aarch64-.*$"]
regex = true
}
}
# Output OCI Ubuntu 22.04 Image Name
output "Ubuntu-22_04-aarch64-latest_name" {
value = data.oci_core_images.ubuntu-22_04-aarch64.images.0.display_name
sensitive = false
}
# Output OCI Ubuntu 22.04 Image ID
output "Ubuntu-22_04-aarch64-latest_ocid" {
value = data.oci_core_images.ubuntu-22_04-aarch64.images.0.id
sensitive = false
}