diff --git a/files/cloud_init.cfg.tftpl b/files/cloud_init.cfg.tftpl index b3945a8..d2c1bee 100644 --- a/files/cloud_init.cfg.tftpl +++ b/files/cloud_init.cfg.tftpl @@ -39,29 +39,9 @@ runcmd: - dhclient - locale-gen -%{ if data_disk } -device_aliases: - data: /dev/vdb -disk_setup: - data: - table_type: 'gpt' - layout: true - overwrite: false -fs_setup: - - label: 'data' - filesystem: 'ext4' - device: data.1 - overwrite: false -%{ endif } - -%{ if data_disk || add_data_share } -mounts: -%{ if data_disk } -- ["data.1", "/mnt/data"] -%{ endif } %{ if add_data_share } -- ["data", "/mnt/data", "9p", "trans=virtio,rw,_netdev", "0", "0"] -%{ endif } +mounts: +- ["data", "/mnt/data", "9p", "trans=virtio,rw", "0", "0"] %{ endif } %{ if fixed_dns != "" } diff --git a/main.tf b/main.tf index 97c3977..8c78dea 100644 --- a/main.tf +++ b/main.tf @@ -14,7 +14,6 @@ locals { use_host_cert = var.use_host_cert, host_cert = trimspace(null_resource.cert.triggers["cert"]), private_key = tls_private_key.debian.private_key_openssh, - data_disk = var.data_disk != null fixed_dns = var.fixed_dns add_data_share = var.add_data_share }) @@ -106,14 +105,6 @@ resource "libvirt_domain" "debian" { volume_id = libvirt_volume.debian.id } - dynamic "disk" { - for_each = var.data_disk != null ? [1] : [] - - content { - volume_id = var.data_disk - } - } - dynamic "filesystem" { for_each = var.add_data_share ? [1] : [] diff --git a/variables.tf b/variables.tf index 7cd972a..9d57ba2 100644 --- a/variables.tf +++ b/variables.tf @@ -84,12 +84,6 @@ variable "use_host_cert" { description = "Whether this machine should receive a SSH host certificate." } -variable "data_disk" { - type = string - default = null - description = "Identifier of the machine's persistent data disk." -} - variable "fixed_address" { type = string default = ""