File tree Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Expand file tree Collapse file tree 3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -38,20 +38,29 @@ resource "talos_machine_configuration_apply" "cp_config_apply" {
3838 client_configuration = talos_machine_secrets. machine_secrets . client_configuration
3939 machine_configuration_input = data. talos_machine_configuration . machineconfig_cp . machine_configuration
4040 node = var. talos_cp_01_ip_addr
41+ config_patches = [
42+ templatefile (" ./templates/cpnetwork.yaml.tmpl" , {cpip = var.cp_vip})
43+ ]
4144}
4245
4346resource "talos_machine_configuration_apply" "cp_config_apply_02" {
4447 depends_on = [proxmox_virtual_environment_vm . talos_cp_02 ]
4548 client_configuration = talos_machine_secrets. machine_secrets . client_configuration
4649 machine_configuration_input = data. talos_machine_configuration . machineconfig_cp_02 . machine_configuration
4750 node = var. talos_cp_02_ip_addr
51+ config_patches = [
52+ templatefile (" ./templates/cpnetwork.yaml.tmpl" , {cpip = var.cp_vip})
53+ ]
4854}
4955
5056resource "talos_machine_configuration_apply" "cp_config_apply_03" {
5157 depends_on = [proxmox_virtual_environment_vm . talos_cp_03 ]
5258 client_configuration = talos_machine_secrets. machine_secrets . client_configuration
5359 machine_configuration_input = data. talos_machine_configuration . machineconfig_cp_03 . machine_configuration
5460 node = var. talos_cp_03_ip_addr
61+ config_patches = [
62+ templatefile (" ./templates/cpnetwork.yaml.tmpl" , {cpip = var.cp_vip})
63+ ]
5564}
5665
5766# Worker Machine Configurations
Original file line number Diff line number Diff line change 1+ machine:
2+ network:
3+ interfaces:
4+ - deviceSelector:
5+ busPath: "0*"
6+ dhcp: true
7+ vip:
8+ ip: ${cpip}
Original file line number Diff line number Diff line change @@ -44,4 +44,8 @@ variable "proxmox_password" {
4444 type = string
4545 sensitive = true
4646 description = " Password for Proxmox API access"
47- }
47+ }
48+ variable "cp_vip" {
49+ type = string
50+ default = " 192.168.3.180"
51+ }
You can’t perform that action at this time.
0 commit comments