diff --git a/alma/alma-9.pkr.hcl b/alma/alma-9.pkr.hcl index 8599113..10f2b93 100644 --- a/alma/alma-9.pkr.hcl +++ b/alma/alma-9.pkr.hcl @@ -41,7 +41,7 @@ source "qemu" "alma_9" { qemuargs = [["-cpu", "host"]] shutdown_command = "shutdown -h now" ssh_private_key_file = "${var.SSH_PRIVATE_KEY_FILE}" - ssh_timeout = "90m" + ssh_timeout = "20m" ssh_username = "root" vm_name = "alma.9-2024.08.29" } diff --git a/builder/SCAI.tfvars b/builder/SCAI.tfvars index 420c6dd..41f2043 100644 --- a/builder/SCAI.tfvars +++ b/builder/SCAI.tfvars @@ -3,6 +3,3 @@ net_id = "c38b0272-637e-4665-a79c-1a37222b572c" # Flavor: medium flavor_id = "73302761-40dc-4ced-91d6-7dd18524a82e" - -# Image: ubuntu 24.04 -image_id = "645e3a38-8a8e-4e88-9b9c-5387fd2017d5" diff --git a/builder/vm.tf b/builder/vm.tf index 89e6729..f17266f 100644 --- a/builder/vm.tf +++ b/builder/vm.tf @@ -9,20 +9,21 @@ variable "net_id" { description = "The id of the network" } -variable "image_id" { - type = string - description = "VM image id" -} - variable "flavor_id" { type = string description = "VM flavor id" } +data "openstack_images_image_v2" "ubuntu-24" { + most_recent = true + properties = { + "ad:appid" = "1157" + } +} resource "openstack_compute_instance_v2" "builder" { name = "builder" - image_id = var.image_id + image_id = data.openstack_images_image_v2.ubuntu-24.id flavor_id = var.flavor_id security_groups = ["default"] user_data = file("cloud-init.yaml")