Skip to content

Commit 553f6da

Browse files
committed
make config_patches optional
1 parent c228ed8 commit 553f6da

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@ module "k8s_cluster_override" {
137137

138138
## Inputs
139139

140-
| Name | Description | Type | Default | Required |
141-
|------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|:--------:|
142-
| <a name="input_cluster"></a> [cluster](#input\_cluster) | Cluster configuration | <pre>object({<br/> name = string # The name of the cluster<br/> config_patches = list(string) # List of configuration patches to apply to the Talos machine configuration<br/> node = string # Default node to deploy the vms on<br/> datastore = string # Default datastore to deploy the vms on<br/> vm_base_id = number # The first VM ID for Proxmox VMs, with subsequent IDs counted up from it<br/> install_disk = optional(string, "/dev/sda") # The disk to install Talos on<br/> })</pre> | n/a | yes |
140+
| Name | Description | Type | Default | Required |
141+
|------|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|:--------:|
142+
| <a name="input_cluster"></a> [cluster](#input\_cluster) | Cluster configuration | <pre>object({<br/> name = string # The name of the cluster<br/> config_patches = optional(list(string), []) # List of configuration patches to apply to the Talos machine configuration<br/> node = string # Default node to deploy the vms on<br/> datastore = string # Default datastore to deploy the vms on<br/> vm_base_id = number # The first VM ID for Proxmox VMs, with subsequent IDs counted up from it<br/> install_disk = optional(string, "/dev/sda") # The disk to install Talos on<br/> })</pre> | n/a | yes |
143143
| <a name="input_controlplane"></a> [controlplane](#input\_controlplane) | Specification of controlplane nodes | <pre>object({<br/> count = number<br/> specs = object({<br/> cpu = number<br/> memory = number<br/> disk = number<br/> })<br/> overrides = optional(map(object({<br/> datastore = optional(string, null)<br/> node = optional(string, null)<br/> cpu = optional(number, null)<br/> memory = optional(number, null)<br/> disk = optional(number, null)<br/> install_disk = optional(string, null)<br/> network = optional(object({<br/> ip_address = string<br/> cidr = string<br/> gateway = string<br/> vlan_id = optional(number, null)<br/> }), null)<br/> })), {})<br/> })</pre> | n/a | yes |
144-
| <a name="input_image"></a> [image](#input\_image) | Variable to define the image configuration for Talos machines | <pre>object({<br/> version = string<br/> extensions = list(string)<br/> factory_url = optional(string, "https://factory.talos.dev")<br/> arch = optional(string, "amd64")<br/> platform = optional(string, "nocloud")<br/> proxmox_datastore = optional(string, "local")<br/> })</pre> | n/a | yes |
145-
| <a name="input_network"></a> [network](#input\_network) | Network configuration for nodes | <pre>object({<br/> bridge = string<br/> cidr = string<br/> gateway = string<br/> dns_servers = list(string)<br/> vlan_id = optional(number, null)<br/> })</pre> | n/a | yes |
144+
| <a name="input_image"></a> [image](#input\_image) | Variable to define the image configuration for Talos machines | <pre>object({<br/> version = string<br/> extensions = list(string)<br/> factory_url = optional(string, "https://factory.talos.dev")<br/> arch = optional(string, "amd64")<br/> platform = optional(string, "nocloud")<br/> proxmox_datastore = optional(string, "local")<br/> })</pre> | n/a | yes |
145+
| <a name="input_network"></a> [network](#input\_network) | Network configuration for nodes | <pre>object({<br/> bridge = string<br/> cidr = string<br/> gateway = string<br/> dns_servers = list(string)<br/> vlan_id = optional(number, null)<br/> })</pre> | n/a | yes |
146146
| <a name="input_worker"></a> [worker](#input\_worker) | Specification of worker nodes | <pre>object({<br/> count = number<br/> specs = object({<br/> cpu = number<br/> memory = number<br/> disk = number<br/> })<br/> overrides = optional(map(object({<br/> datastore = optional(string, null)<br/> node = optional(string, null)<br/> cpu = optional(number, null)<br/> memory = optional(number, null)<br/> disk = optional(number, null)<br/> install_disk = optional(string, null)<br/> network = optional(object({<br/> ip_address = string<br/> cidr = string<br/> gateway = string<br/> vlan_id = optional(number, null)<br/> }), null)<br/> })), {})<br/> })</pre> | n/a | yes |
147147

148148
## Outputs

proxmox_vm_controlplanes.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resource "proxmox_virtual_environment_vm" "controlplane" {
1313
disk = each.value.disk
1414
proxmox_node = each.value.node
1515
})
16-
tags = [var.cluster.name]
16+
tags = [var.cluster.name]
1717
vm_id = each.value.vm_id
1818
machine = "q35"
1919
scsi_hardware = "virtio-scsi-single"

proxmox_vm_worker.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resource "proxmox_virtual_environment_vm" "worker" {
1313
disk = each.value.disk
1414
proxmox_node = each.value.node
1515
})
16-
tags = [var.cluster.name]
16+
tags = [var.cluster.name]
1717
vm_id = each.value.vm_id
1818
machine = "q35"
1919
scsi_hardware = "virtio-scsi-single"

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ variable "cluster" {
22
description = "Cluster configuration"
33
type = object({
44
name = string # The name of the cluster
5-
config_patches = list(string) # List of configuration patches to apply to the Talos machine configuration
5+
config_patches = optional(list(string), []) # List of configuration patches to apply to the Talos machine configuration
66
node = string # Default node to deploy the vms on
77
datastore = string # Default datastore to deploy the vms on
88
vm_base_id = number # The first VM ID for Proxmox VMs, with subsequent IDs counted up from it
@@ -55,7 +55,7 @@ variable "image" {
5555
variable "network" {
5656
description = "Network configuration for nodes"
5757
type = object({
58-
bridge = optional(string, "vmbr0") # The bridge to use for the network interface
58+
bridge = optional(string, "vmbr0") # The bridge to use for the network interface
5959
cidr = string
6060
gateway = string
6161
dns_servers = list(string)

0 commit comments

Comments
 (0)