feat(terraform): Mise à jour provider Proxmox v3.0.2-rc05
Update provider version and adjust resource syntax for compatibility.
This commit is contained in:
parent
350b491aef
commit
573852579f
3 changed files with 42 additions and 30 deletions
|
|
@ -4,7 +4,7 @@ terraform {
|
||||||
required_providers {
|
required_providers {
|
||||||
proxmox = {
|
proxmox = {
|
||||||
source = "telmate/proxmox"
|
source = "telmate/proxmox"
|
||||||
version = "~> 2.9"
|
version = "3.0.2-rc05"
|
||||||
}
|
}
|
||||||
local = {
|
local = {
|
||||||
source = "hashicorp/local"
|
source = "hashicorp/local"
|
||||||
|
|
@ -20,32 +20,36 @@ provider "proxmox" {
|
||||||
pm_tls_insecure = var.proxmox_tls_insecure
|
pm_tls_insecure = var.proxmox_tls_insecure
|
||||||
}
|
}
|
||||||
|
|
||||||
# K3s Server VM on pve1
|
# K3s Server VM on acemagician
|
||||||
resource "proxmox_vm_qemu" "k3s_server_1" {
|
resource "proxmox_vm_qemu" "k3s_server_1" {
|
||||||
name = "k3s-server-1"
|
name = "k3s-server-1"
|
||||||
target_node = "pve1"
|
target_node = "acemagician"
|
||||||
clone = var.ubuntu_template
|
clone = var.ubuntu_template
|
||||||
|
|
||||||
cores = var.k3s_server_1_config.cores
|
cpu {
|
||||||
sockets = 1
|
cores = var.k3s_server_1_config.cores
|
||||||
memory = var.k3s_server_1_config.memory
|
sockets = 1
|
||||||
agent = 1
|
}
|
||||||
|
|
||||||
|
memory = var.k3s_server_1_config.memory
|
||||||
|
agent = 1
|
||||||
|
|
||||||
boot = "order=scsi0"
|
boot = "order=scsi0"
|
||||||
scsihw = "virtio-scsi-single"
|
scsihw = "virtio-scsi-single"
|
||||||
onboot = true
|
onboot = true
|
||||||
|
|
||||||
network {
|
network {
|
||||||
|
id = 0
|
||||||
model = "virtio"
|
model = "virtio"
|
||||||
bridge = var.k3s_network_bridge
|
bridge = var.k3s_network_bridge
|
||||||
}
|
}
|
||||||
|
|
||||||
disk {
|
disk {
|
||||||
slot = 0
|
slot = "scsi0"
|
||||||
size = var.k3s_server_1_config.disk_size
|
size = var.k3s_server_1_config.disk_size
|
||||||
type = "scsi"
|
type = "disk"
|
||||||
storage = var.storage_pool
|
storage = var.storage_pool
|
||||||
iothread = 1
|
iothread = true
|
||||||
}
|
}
|
||||||
|
|
||||||
ipconfig0 = "ip=${var.k3s_server_1_config.ip},gw=${var.k3s_gateway}"
|
ipconfig0 = "ip=${var.k3s_server_1_config.ip},gw=${var.k3s_gateway}"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ terraform {
|
||||||
required_providers {
|
required_providers {
|
||||||
proxmox = {
|
proxmox = {
|
||||||
source = "telmate/proxmox"
|
source = "telmate/proxmox"
|
||||||
version = "~> 2.9"
|
version = "3.0.2-rc05"
|
||||||
}
|
}
|
||||||
local = {
|
local = {
|
||||||
source = "hashicorp/local"
|
source = "hashicorp/local"
|
||||||
|
|
@ -20,32 +20,36 @@ provider "proxmox" {
|
||||||
pm_tls_insecure = var.proxmox_tls_insecure
|
pm_tls_insecure = var.proxmox_tls_insecure
|
||||||
}
|
}
|
||||||
|
|
||||||
# K3s Server VM on pve2
|
# K3s Server VM on elitedesk
|
||||||
resource "proxmox_vm_qemu" "k3s_server_2" {
|
resource "proxmox_vm_qemu" "k3s_server_2" {
|
||||||
name = "k3s-server-2"
|
name = "k3s-server-2"
|
||||||
target_node = "pve2"
|
target_node = "elitedesk"
|
||||||
clone = var.ubuntu_template
|
clone = var.ubuntu_template
|
||||||
|
|
||||||
cores = var.k3s_server_2_config.cores
|
cpu {
|
||||||
sockets = 1
|
cores = var.k3s_server_2_config.cores
|
||||||
memory = var.k3s_server_2_config.memory
|
sockets = 1
|
||||||
agent = 1
|
}
|
||||||
|
|
||||||
|
memory = var.k3s_server_2_config.memory
|
||||||
|
agent = 1
|
||||||
|
|
||||||
boot = "order=scsi0"
|
boot = "order=scsi0"
|
||||||
scsihw = "virtio-scsi-single"
|
scsihw = "virtio-scsi-single"
|
||||||
onboot = true
|
onboot = true
|
||||||
|
|
||||||
network {
|
network {
|
||||||
|
id = 0
|
||||||
model = "virtio"
|
model = "virtio"
|
||||||
bridge = var.k3s_network_bridge
|
bridge = var.k3s_network_bridge
|
||||||
}
|
}
|
||||||
|
|
||||||
disk {
|
disk {
|
||||||
slot = 0
|
slot = "scsi0"
|
||||||
size = var.k3s_server_2_config.disk_size
|
size = var.k3s_server_2_config.disk_size
|
||||||
type = "scsi"
|
type = "disk"
|
||||||
storage = var.storage_pool
|
storage = var.storage_pool
|
||||||
iothread = 1
|
iothread = true
|
||||||
}
|
}
|
||||||
|
|
||||||
ipconfig0 = "ip=${var.k3s_server_2_config.ip},gw=${var.k3s_gateway}"
|
ipconfig0 = "ip=${var.k3s_server_2_config.ip},gw=${var.k3s_gateway}"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ terraform {
|
||||||
required_providers {
|
required_providers {
|
||||||
proxmox = {
|
proxmox = {
|
||||||
source = "telmate/proxmox"
|
source = "telmate/proxmox"
|
||||||
version = "~> 2.9"
|
version = "3.0.2-rc05"
|
||||||
}
|
}
|
||||||
local = {
|
local = {
|
||||||
source = "hashicorp/local"
|
source = "hashicorp/local"
|
||||||
|
|
@ -20,32 +20,36 @@ provider "proxmox" {
|
||||||
pm_tls_insecure = var.proxmox_tls_insecure
|
pm_tls_insecure = var.proxmox_tls_insecure
|
||||||
}
|
}
|
||||||
|
|
||||||
# etcd Witness VM on pve3
|
# etcd Witness VM on thinkpad
|
||||||
resource "proxmox_vm_qemu" "etcd_witness" {
|
resource "proxmox_vm_qemu" "etcd_witness" {
|
||||||
name = "etcd-witness"
|
name = "etcd-witness"
|
||||||
target_node = "pve3"
|
target_node = "thinkpad"
|
||||||
clone = var.ubuntu_template
|
clone = var.ubuntu_template
|
||||||
|
|
||||||
cores = var.etcd_witness_config.cores
|
cpu {
|
||||||
sockets = 1
|
cores = var.etcd_witness_config.cores
|
||||||
memory = var.etcd_witness_config.memory
|
sockets = 1
|
||||||
agent = 1
|
}
|
||||||
|
|
||||||
|
memory = var.etcd_witness_config.memory
|
||||||
|
agent = 1
|
||||||
|
|
||||||
boot = "order=scsi0"
|
boot = "order=scsi0"
|
||||||
scsihw = "virtio-scsi-single"
|
scsihw = "virtio-scsi-single"
|
||||||
onboot = true
|
onboot = true
|
||||||
|
|
||||||
network {
|
network {
|
||||||
|
id = 0
|
||||||
model = "virtio"
|
model = "virtio"
|
||||||
bridge = var.k3s_network_bridge
|
bridge = var.k3s_network_bridge
|
||||||
}
|
}
|
||||||
|
|
||||||
disk {
|
disk {
|
||||||
slot = 0
|
slot = "scsi0"
|
||||||
size = var.etcd_witness_config.disk_size
|
size = var.etcd_witness_config.disk_size
|
||||||
type = "scsi"
|
type = "disk"
|
||||||
storage = var.storage_pool
|
storage = var.storage_pool
|
||||||
iothread = 1
|
iothread = true
|
||||||
}
|
}
|
||||||
|
|
||||||
ipconfig0 = "ip=${var.etcd_witness_config.ip},gw=${var.k3s_gateway}"
|
ipconfig0 = "ip=${var.etcd_witness_config.ip},gw=${var.k3s_gateway}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue