Compare commits
5 Commits
7a40f2db5b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 507c4f2085 | |||
| f4b22647c4 | |||
| 69408d9be8 | |||
| c1f35a667d | |||
| 0863657573 |
@@ -8,7 +8,7 @@ The following requirements are needed by this module:
|
||||
|
||||
The following providers are used by this module:
|
||||
|
||||
- <a name="provider_dns"></a> [dns](#provider\_dns) (~> 3.2)
|
||||
- <a name="provider_dns"></a> [dns](#provider\_dns) (3.2.3)
|
||||
|
||||
## Modules
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The following requirements are needed by this module:
|
||||
|
||||
- <a name="requirement_libvirt"></a> [libvirt](#requirement\_libvirt) (~> 0.6.14)
|
||||
- <a name="requirement_libvirt"></a> [libvirt](#requirement\_libvirt) (>= 0.6.14)
|
||||
|
||||
- <a name="requirement_macaddress"></a> [macaddress](#requirement\_macaddress) (~> 0.3.0)
|
||||
|
||||
@@ -10,9 +10,9 @@ The following requirements are needed by this module:
|
||||
|
||||
The following providers are used by this module:
|
||||
|
||||
- <a name="provider_libvirt"></a> [libvirt](#provider\_libvirt) (~> 0.6.14)
|
||||
- <a name="provider_libvirt"></a> [libvirt](#provider\_libvirt) (0.7.0)
|
||||
|
||||
- <a name="provider_macaddress"></a> [macaddress](#provider\_macaddress) (~> 0.3.0)
|
||||
- <a name="provider_macaddress"></a> [macaddress](#provider\_macaddress) (0.3.2)
|
||||
|
||||
## Modules
|
||||
|
||||
@@ -112,6 +112,21 @@ Type: `bool`
|
||||
|
||||
Default: `true`
|
||||
|
||||
### <a name="input_extra_interfaces"></a> [extra\_interfaces](#input\_extra\_interfaces)
|
||||
|
||||
Description: Extra network interfaces to attach to the VM
|
||||
|
||||
Type:
|
||||
|
||||
```hcl
|
||||
list(object({
|
||||
bridge = string
|
||||
mac = string
|
||||
}))
|
||||
```
|
||||
|
||||
Default: `[]`
|
||||
|
||||
### <a name="input_filesystems"></a> [filesystems](#input\_filesystems)
|
||||
|
||||
Description: 9p shared filesystem devices
|
||||
@@ -129,6 +144,14 @@ list(object({
|
||||
|
||||
Default: `[]`
|
||||
|
||||
### <a name="input_machine"></a> [machine](#input\_machine)
|
||||
|
||||
Description: The machine type - can be i440fx (default) or q35. PCIe support requires Q35 (or better)
|
||||
|
||||
Type: `string`
|
||||
|
||||
Default: `null`
|
||||
|
||||
### <a name="input_meta_data"></a> [meta\_data](#input\_meta\_data)
|
||||
|
||||
Description: Cloud-init meta-data
|
||||
@@ -161,6 +184,14 @@ Type: `string`
|
||||
|
||||
Default: `""`
|
||||
|
||||
### <a name="input_uefi"></a> [uefi](#input\_uefi)
|
||||
|
||||
Description: Whether or not to create an UEFI domain
|
||||
|
||||
Type: `bool`
|
||||
|
||||
Default: `false`
|
||||
|
||||
### <a name="input_vcpu"></a> [vcpu](#input\_vcpu)
|
||||
|
||||
Description: CPU count
|
||||
@@ -179,4 +210,24 @@ Default: `null`
|
||||
|
||||
## Outputs
|
||||
|
||||
No outputs.
|
||||
The following outputs are exported:
|
||||
|
||||
### <a name="output__disk"></a> [\_disk](#output\_\_disk)
|
||||
|
||||
Description: n/a
|
||||
|
||||
### <a name="output__domain"></a> [\_domain](#output\_\_domain)
|
||||
|
||||
Description: n/a
|
||||
|
||||
### <a name="output__pool"></a> [\_pool](#output\_\_pool)
|
||||
|
||||
Description: n/a
|
||||
|
||||
### <a name="output_ipam"></a> [ipam](#output\_ipam)
|
||||
|
||||
Description: n/a
|
||||
|
||||
### <a name="output_macaddress"></a> [macaddress](#output\_macaddress)
|
||||
|
||||
Description: n/a
|
||||
|
||||
@@ -47,6 +47,13 @@ resource "libvirt_domain" "this" {
|
||||
bridge = module.ipam.lawndale_interface
|
||||
mac = macaddress.this.address
|
||||
}
|
||||
dynamic "network_interface" {
|
||||
for_each = var.extra_interfaces
|
||||
content {
|
||||
bridge = network_interface.value.bridge
|
||||
mac = network_interface.value.mac
|
||||
}
|
||||
}
|
||||
|
||||
disk {
|
||||
volume_id = libvirt_volume.this.id
|
||||
@@ -79,6 +86,10 @@ resource "libvirt_domain" "this" {
|
||||
xslt = xml.value
|
||||
}
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [nvram, disk[0].scsi]
|
||||
}
|
||||
}
|
||||
|
||||
resource "libvirt_cloudinit_disk" "this" {
|
||||
|
||||
@@ -2,7 +2,7 @@ terraform {
|
||||
required_providers {
|
||||
libvirt = {
|
||||
source = "dmacvicar/libvirt"
|
||||
version = "~> 0.6.14"
|
||||
version = ">= 0.6.14"
|
||||
}
|
||||
|
||||
macaddress = {
|
||||
|
||||
@@ -122,3 +122,13 @@ variable "xslt" {
|
||||
description = "XSLT applied to the domain before sent to libvirt"
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "extra_interfaces" {
|
||||
type = list(object({
|
||||
bridge = string
|
||||
mac = string
|
||||
}))
|
||||
|
||||
description = "Extra network interfaces to attach to the VM"
|
||||
default = []
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user