support data disks
This commit is contained in:
parent
65a218f076
commit
c80ec7a6f6
2 changed files with 12 additions and 0 deletions
7
main.tf
7
main.tf
|
@ -78,6 +78,13 @@ resource "libvirt_domain" "debian" {
|
||||||
volume_id = libvirt_volume.debian.id
|
volume_id = libvirt_volume.debian.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dynamic "disk" {
|
||||||
|
for_each = var.data_disks
|
||||||
|
content {
|
||||||
|
volume_id = disk.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
network_interface {
|
network_interface {
|
||||||
bridge = var.bridge_name
|
bridge = var.bridge_name
|
||||||
hostname = var.name
|
hostname = var.name
|
||||||
|
|
|
@ -54,3 +54,8 @@ variable "bridge_name" {
|
||||||
variable "ca_host" {
|
variable "ca_host" {
|
||||||
type = string
|
type = string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
variable "data_disks" {
|
||||||
|
type = list(string)
|
||||||
|
default = []
|
||||||
|
}
|
||||||
|
|
Reference in a new issue