We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d16e96a commit 6f76aa9Copy full SHA for 6f76aa9
1 file changed
packer/ubuntu/ubuntu.pkr.hcl
@@ -11,6 +11,13 @@ build {
11
}
12
13
14
+locals {
15
+ disk_size = lookup({
16
+ "2204oneke" = 3072
17
+ "2204oneke.aarch64" = 3072
18
+ }, var.version, 0)
19
+}
20
+
21
# Build VM image
22
source "qemu" "ubuntu" {
23
cpus = 2
@@ -34,8 +41,8 @@ source "qemu" "ubuntu" {
34
41
net_device = "virtio-net"
35
42
format = "qcow2"
36
43
disk_compression = false
37
- disk_size = 3072
38
- skip_resize_disk = false
44
+ skip_resize_disk = local.disk_size == 0 ? true : false
45
+ disk_size = local.disk_size == 0 ? null : local.disk_size
39
46
40
47
output_directory = var.output_dir
48
0 commit comments