init
This commit is contained in:
73
main.tf
Normal file
73
main.tf
Normal file
@@ -0,0 +1,73 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
proxmox = {
|
||||
source = "bpg/proxmox"
|
||||
version = "~> 0.75.0"
|
||||
}
|
||||
talos = {
|
||||
source = "siderolabs/talos"
|
||||
version = "~> 0.7.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "proxmox" {
|
||||
endpoint = "https://192.168.8.10:8006/"
|
||||
insecure = true
|
||||
}
|
||||
|
||||
module "talos" {
|
||||
source = "bbtechsys/talos/proxmox"
|
||||
version = "0.1.5"
|
||||
talos_cluster_name = "talos-nsk2"
|
||||
talos_version = "1.10.6"
|
||||
|
||||
proxmox_image_datastore = "nvme1"
|
||||
proxmox_iso_datastore = "Images"
|
||||
|
||||
worker_machine_config_patches = [
|
||||
<<EOT
|
||||
cluster:
|
||||
allowSchedulingOnControlPlanes: true
|
||||
network:
|
||||
cni:
|
||||
name: none
|
||||
proxy:
|
||||
disabled: true
|
||||
EOT
|
||||
]
|
||||
control_machine_config_patches = [
|
||||
<<EOT
|
||||
cluster:
|
||||
allowSchedulingOnControlPlanes: true
|
||||
network:
|
||||
cni:
|
||||
name: none
|
||||
proxy:
|
||||
disabled: true
|
||||
EOT
|
||||
]
|
||||
|
||||
proxmox_control_vm_disk_size = 30
|
||||
proxmox_worker_vm_disk_size = 30
|
||||
|
||||
control_nodes = {
|
||||
"talos-cp-1" = "pve2-nsk"
|
||||
}
|
||||
worker_nodes = {
|
||||
"talos-worker-1" = "pve2-nsk"
|
||||
"talos-worker-2" = "pve2-nsk"
|
||||
}
|
||||
}
|
||||
|
||||
output "talos_config" {
|
||||
description = "Talos configuration file"
|
||||
value = module.talos.talos_config
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
output "kubeconfig" {
|
||||
description = "Kubeconfig file"
|
||||
value = module.talos.kubeconfig
|
||||
sensitive = true
|
||||
}
|
Reference in New Issue
Block a user