Files
vms/sources/inputs.pkr.hcl
T

143 lines
2.4 KiB
HCL
Raw Normal View History

2022-05-25 01:40:52 -05:00
variable "iso" {
2023-12-06 08:21:32 -08:00
type = map(string)
description = "A map containing the URL and checksum for the ISO file"
2022-05-25 01:40:52 -05:00
}
variable "distro" {
2023-12-06 08:21:32 -08:00
type = string
default = "unknown"
2022-05-25 01:40:52 -05:00
}
variable "arch" {
2023-12-06 08:21:32 -08:00
type = string
default = "amd64"
2022-05-25 01:40:52 -05:00
}
variable "version" {
2023-12-06 08:21:32 -08:00
type = string
description = "The distro version being specified"
2022-05-25 01:40:52 -05:00
}
variable "boot_wait" {
2023-12-06 08:21:32 -08:00
type = string
default = "15s"
description = "Length of time to wait before entering boot commands"
2022-05-25 01:40:52 -05:00
}
variable "boot_command" {
2023-12-06 08:21:32 -08:00
type = list(string)
default = []
2022-05-25 01:40:52 -05:00
}
variable "shutdown_command" {
2023-12-06 08:21:32 -08:00
type = string
default = "sudo systemctl poweroff"
2022-05-25 01:40:52 -05:00
}
variable "headless" {
2023-12-06 08:21:32 -08:00
type = bool
default = true
2022-05-25 01:40:52 -05:00
}
2022-05-27 08:40:09 -05:00
variable "vagrant_cloud_token" {
2023-12-06 08:21:32 -08:00
type = string
default = env("VAGRANT_CLOUD_TOKEN")
2022-05-27 08:40:09 -05:00
}
2022-06-08 02:27:48 -05:00
variable "build" {
2023-12-06 08:21:32 -08:00
type = string
2024-07-23 18:22:30 -05:00
default = env("BUILD")
2022-06-08 02:27:48 -05:00
}
2023-08-11 20:36:18 -05:00
variable "cd_content" {
2023-12-06 08:21:32 -08:00
type = map(string)
default = {}
2023-08-03 14:44:02 -05:00
}
2023-08-11 20:36:18 -05:00
variable "cd_files" {
2023-12-06 08:21:32 -08:00
type = list(string)
default = []
2023-08-11 20:36:18 -05:00
}
2023-08-03 14:44:02 -05:00
variable "cd_label" {
2023-12-06 08:21:32 -08:00
type = string
default = "cidata"
2023-08-03 14:44:02 -05:00
}
2023-08-03 15:46:44 -05:00
variable "http_files" {
2023-12-06 08:21:32 -08:00
type = map(string)
default = {}
2023-08-03 15:46:44 -05:00
}
2023-08-11 20:36:18 -05:00
variable "http_directory" {
2023-12-06 08:21:32 -08:00
type = string
default = ""
}
2023-12-12 11:57:09 -06:00
variable "http_port_min" {
type = number
default = 8000
}
variable "http_port_max" {
type = number
default = 9000
}
2023-12-06 08:21:32 -08:00
variable "cpu_model" {
type = string
default = "host"
}
variable "cpus" {
type = number
default = 4
}
variable "memory" {
type = number
default = 8192
2023-08-11 20:36:18 -05:00
}
2023-12-30 05:37:32 +00:00
variable "efi_dir" {
type = string
default = env("EFI_DIR")
}
2024-01-09 22:18:34 -06:00
variable "vbox_os_type" {
type = string
default = "Linux_64"
}
2024-06-26 16:00:57 -05:00
variable "storage_url" {
type = string
default = env("STORAGE_URL")
}
variable "minio_secret" {
type = string
default = env("MINIO_SECRET")
}
2022-05-25 01:40:52 -05:00
locals {
2023-12-06 08:21:32 -08:00
name = "${var.distro}-${var.version}"
description = templatefile("../README.box.md", {
distro = var.distro
arch = var.arch
version = var.version
build = var.build
})
2024-12-24 01:00:23 -06:00
iso_location = "s3::http://${var.storage_url}/isos/cache/${var.distro}/${var.iso.checksum}.iso?aws_access_key_id=root&aws_access_key_secret=${var.minio_secret}"
2022-06-04 13:23:22 -05:00
2023-12-06 08:21:32 -08:00
cpus = var.cpus
memory = var.memory
2025-01-26 06:32:44 -06:00
disk_size = 20
2023-12-06 08:21:32 -08:00
ssh = {
username = "vagrant"
password = "vagrant"
handshake_attempts = 1000
timeout = "5h45m"
private_key_file = "vagrant/insecure_key"
}
2022-05-25 01:40:52 -05:00
}