Skip to content

Commit

Permalink
Merge pull request #32 from MonolithProjects/develop
Browse files Browse the repository at this point in the history
Develop to Master
  • Loading branch information
MonolithProjects authored May 1, 2024
2 parents 36b1662 + 657dcbf commit ce031aa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ No modules.
| <a name="input_bridge"></a> [bridge](#input\_bridge) | Bridge interface | `string` | `"virbr0"` | no |
| <a name="input_cpu_mode"></a> [cpu\_mode](#input\_cpu\_mode) | CPU mode | `string` | `"host-passthrough"` | no |
| <a name="input_dhcp"></a> [dhcp](#input\_dhcp) | Use DHCP or Static IP settings | `bool` | `false` | no |
| <a name="input_graphics"></a> [graphics](#graphics) | Graphics type (can be '`spice`' or '`vnc`') | `string` | `spice` | no |
| <a name="input_index_start"></a> [index\_start](#input\_index\_start) | From where the indexig start | `number` | `1` | no |
| <a name="input_ip_address"></a> [ip\_address](#input\_ip\_address) | List of IP addresses | `list(string)` | <pre>[<br> "192.168.123.101"<br>]</pre> | no |
| <a name="input_ip_gateway"></a> [ip\_gateway](#input\_ip\_gateway) | IP addresses of a gateway | `string` | `"192.168.123.1"` | no |
Expand Down
1 change: 1 addition & 0 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module "test_nodes" {
memory = "512"
vcpu = 1
system_volume = 20
graphics = "vnc"
ssh_admin = "admin"
ssh_private_key = "~/.ssh/your_key_id_ed25519"
ssh_keys = [
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ resource "libvirt_domain" "virt-machine" {
}

graphics {
type = "spice"
type = var.graphics
listen_type = "address"
autoport = true
}
Expand Down
11 changes: 11 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,14 @@ variable "runcmd" {
"[ systemctl, restart, systemd-networkd ]"
]
}

variable "graphics" {
description = "Graphics type"
type = string
default = "spice"

validation {
condition = contains(["spice", "vnc"], var.graphics)
error_message = "Graphics type not supported. Only 'spice' or 'vnc' are valid options."
}
}

0 comments on commit ce031aa

Please sign in to comment.