26 Commits

Author SHA1 Message Date
812c9c4d89 [deploy-opentofu]
[deploy-opentofu]
2025-12-09 19:38:45 +00:00
705c5df1f5 [deploy-opentofu]
[deploy-opentofu]
2025-12-09 19:38:15 +00:00
2aefa6a415 Merge pull request '[deploy-opentofu]' (#326) from fenix-admin into dev
Reviewed-on: fenix-gitea-admin/iac-opentofu-private#326
2025-12-09 13:41:15 +00:00
88de7affda [deploy-opentofu]
[deploy-opentofu]
2025-12-09 13:40:55 +00:00
dd5c7b0fdc Merge pull request '[deploy-opentofu]' (#325) from fenix-admin into dev
Reviewed-on: fenix-gitea-admin/iac-opentofu-private#325
2025-12-08 15:29:21 +00:00
4934c33104 c
c
2025-12-08 15:26:32 +00:00
d2241e2dfa Update proxmox.variables.tf 2025-12-08 15:25:54 +00:00
ff6cde3603 Merge pull request '[deploy-opentofu]' (#324) from fenix-admin into dev
Reviewed-on: fenix-gitea-admin/iac-opentofu-private#324
2025-12-08 15:19:03 +00:00
6fc1890c1c [deploy-opentofu]
[deploy-opentofu]
2025-12-08 15:18:37 +00:00
3e49c091f5 a
a
2025-12-08 15:17:35 +00:00
96caa55294 Merge pull request '[deploy-opentofu]' (#323) from fenix-admin into dev
Reviewed-on: fenix-gitea-admin/iac-opentofu-private#323
2025-12-08 15:05:20 +00:00
39cb2a6c20 [deploy-opentofu]
[deploy-opentofu]
2025-12-08 15:05:01 +00:00
c11f2e3c25 a
a
2025-12-08 15:04:19 +00:00
3cd41f0095 Merge pull request '[deploy-opentofu]' (#322) from fenix-admin into dev
Reviewed-on: fenix-gitea-admin/iac-opentofu-private#322
2025-12-08 14:42:23 +00:00
badfc5fa24 [deploy-opentofu]
[deploy-opentofu]
2025-12-08 14:42:03 +00:00
222c2cc352 Merge pull request '[deploy-opentofu]' (#321) from fenix-admin into dev
Reviewed-on: fenix-gitea-admin/iac-opentofu-private#321
2025-12-08 14:34:35 +00:00
d3db951dfa [deploy-opentofu]
[deploy-opentofu]
2025-12-08 14:33:59 +00:00
7a32716a23 Update proxmox.variables.tf 2025-12-08 14:26:40 +00:00
f629a09ba7 Merge pull request '[deploy-opentofu]' (#320) from fenix-admin into dev
Reviewed-on: fenix-gitea-admin/iac-opentofu-private#320
2025-12-02 14:19:58 +00:00
1a8f746bbd Update proxmox.tf 2025-12-02 14:14:36 +00:00
53604340ef Merge pull request '[deploy-opentofu]' (#319) from fenix-admin into dev
Reviewed-on: fenix-gitea-admin/iac-opentofu-private#319
2025-11-07 17:23:00 +00:00
c70b254a84 [deploy-opentofu] 2025-11-07 17:21:29 +00:00
70e32e0581 Merge pull request '[deploy-opentofu]' (#318) from fenix-admin into dev
Reviewed-on: fenix-gitea-admin/iac-opentofu-private#318
2025-11-05 19:16:52 +00:00
fb1f46a27d Update proxmox.tf 2025-11-05 19:15:36 +00:00
84e065a8d5 Merge pull request '[deploy-opentofu]' (#317) from fenix-admin into dev
Reviewed-on: fenix-gitea-admin/iac-opentofu-private#317
2025-11-05 14:35:02 +00:00
3a6706b9bc Update proxmox.tf 2025-11-05 14:33:56 +00:00
2 changed files with 21 additions and 4 deletions

View File

@ -19,7 +19,7 @@ resource "proxmox_virtual_environment_download_file" "latest_ubunto_cloud_img" {
content_type = "iso"
datastore_id = "local"
node_name = "fenix"
url = "https://cloud-images.ubuntu.com/jammy/20251023/jammy-server-cloudimg-amd64.img"
url = "https://cloud-images.ubuntu.com/jammy/20251206/jammy-server-cloudimg-amd64.img"
file_name = "jammyservercloudimgamd64.img"
}
@ -105,6 +105,7 @@ resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
cpu {
cores = 2
type = "host"
}
memory {
@ -116,14 +117,13 @@ resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
file_id = proxmox_virtual_environment_download_file.latest_ubunto_cloud_img.id
interface = "scsi0"
file_format = "qcow2"
size = 64
}
# Configuração da interface de rede
network_device {
bridge = "vmbr0" # rede de gestão para comunicação com Cluster A
vlan_id = 20
bridge = "vmbr0" # rede de gestão para comunicação com Cluster B
}
initialization {
dns {
@ -149,10 +149,12 @@ resource "proxmox_virtual_environment_vm" "k8s_vms" {
clone {
vm_id = proxmox_virtual_environment_vm.proxmox-kubernetes-VM-template.id
full = true
}
cpu {
cores = each.value.cores
type = "host"
}
memory {
@ -165,6 +167,16 @@ resource "proxmox_virtual_environment_vm" "k8s_vms" {
interface = "scsi1"
}
# Bloco dinâmico para lista de hostpci
dynamic "hostpci" {
for_each = try(each.value.hostpci, [])
content {
device = hostpci.value.device
pcie = try(hostpci.value.pcie, true)
mapping = hostpci.value.mapping
}
}
initialization {
ip_config {
ipv4 {

View File

@ -42,6 +42,11 @@ variable "proxmox_k8s_vms" {
ip = string
ip2 = string
ip3 = string
hostpci = optional(list(object({
pcie = bool
device = string
mapping = string
})))
cores = optional(number)
memory = optional(number)
data_store = optional(string)