This commit is contained in:
Pim Kunis 2023-04-05 17:39:38 +02:00
commit 625dc5f98b
2 changed files with 72 additions and 0 deletions

21
debian/main.tf vendored Normal file
View file

@ -0,0 +1,21 @@
terraform {
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
}
}
}
module "tf_debian_vm" {
source = "ssh::https://git.pim.kunis.nl/pim/tf-debian-vm.git"
name = var.name
admin_authorized_keys = var.admin_authorized_keys
insecure_password = var.insecure_password
use_host_cert = var.use_host_cert
disk_pool = var.disk_pool
disk_base = var.disk_base
disk_base_pool = var.disk_base_pool
cloudinit_pool = var.cloudinit_pool
bridge_name = var.bridge_name
ca_host = var.ca_host
}

51
debian/variables.tf vendored Normal file
View file

@ -0,0 +1,51 @@
variable "name" {
type = string
}
variable "admin_authorized_keys" {
type = list(string)
default = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOodpLr+FDRyKyHjucHizNLVFHZ5AQmE9GmxMnOsSoaw pimkunis@thinkpadpim",
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINUZp4BCxf7uLa1QWonx/Crf8tYZ5MKIZ+EuaBa82LrV user@user-laptop"
]
}
variable "insecure_password" {
type = bool
default = false
}
variable "use_host_cert" {
type = bool
default = true
}
variable "disk_pool" {
type = string
default = "disk"
}
variable "disk_base" {
type = string
default = "debian-bookworm.qcow2"
}
variable "disk_base_pool" {
type = string
default = "iso"
}
variable "cloudinit_pool" {
type = string
default = "init"
}
variable "bridge_name" {
type = string
default = "dmzbr"
}
variable "ca_host" {
type = string
default = "hermes.dmz"
}