mirror of
https://github.com/outbackdingo/homelab-v.git
synced 2026-08-25 14:53:19 +00:00
feat(config): added optional variable dns to node configuration
Signed-off-by: Christopher Macnichol <[email protected]>
This commit is contained in:
@@ -41,6 +41,7 @@ module "talos" {
|
||||
host_node = "abel"
|
||||
machine_type = "controlplane"
|
||||
ip = "192.168.1.100"
|
||||
#dns = ["1.1.1.1", "8.8.8.8"] # Optional Value.
|
||||
mac_address = "BC:24:11:2E:C8:00"
|
||||
vm_id = 800
|
||||
cpu = 8
|
||||
|
||||
@@ -34,6 +34,7 @@ variable "nodes" {
|
||||
machine_type = string
|
||||
datastore_id = optional(string, "local-zfs")
|
||||
ip = string
|
||||
dns = optional(list(string))
|
||||
mac_address = string
|
||||
vm_id = number
|
||||
cpu = number
|
||||
|
||||
@@ -51,6 +51,15 @@ resource "proxmox_virtual_environment_vm" "this" {
|
||||
|
||||
initialization {
|
||||
datastore_id = each.value.datastore_id
|
||||
|
||||
# Optional DNS Block. Update Nodes with a list value to use.
|
||||
dynamic "dns" {
|
||||
for_each = try(each.value.dns, null) != null ? { "enabled" = each.value.dns } : {}
|
||||
content {
|
||||
servers = each.value.dns
|
||||
}
|
||||
}
|
||||
|
||||
ip_config {
|
||||
ipv4 {
|
||||
address = "${each.value.ip}/${var.cluster.subnet_mask}"
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
# Usage: sh upgrade-k8s.sh <controlplane node> or sh upgrade-k8s.sh <controlplane node> --dry-run (for a dry run)
|
||||
talosctl $2 --nodes $1 upgrade-k8s --to 1.32.0 # renovate: github-releases=kubernetes/kubernetes
|
||||
Reference in New Issue
Block a user