commit 625dc5f98b422d2febb332cc7c706b1e95eaac85 Author: Pim Kunis Date: Wed Apr 5 17:39:38 2023 +0200 init diff --git a/debian/main.tf b/debian/main.tf new file mode 100644 index 0000000..48d3942 --- /dev/null +++ b/debian/main.tf @@ -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 +} diff --git a/debian/variables.tf b/debian/variables.tf new file mode 100644 index 0000000..5abefcf --- /dev/null +++ b/debian/variables.tf @@ -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" +}