mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 15:53:06 +00:00
Merge pull request 'Update proxmox.tf' (#205) from fenix-admin into main
Reviewed-on: fenix-gitea-admin/iac-teste#205
This commit is contained in:
20
proxmox.tf
20
proxmox.tf
@ -149,6 +149,12 @@ resource "proxmox_virtual_environment_vm" "k8s_vms" {
|
|||||||
node_name = each.value.node_name
|
node_name = each.value.node_name
|
||||||
vm_id = each.value.vm_id
|
vm_id = each.value.vm_id
|
||||||
|
|
||||||
|
started = false
|
||||||
|
tags = ["opentofu", "kubernetes", "fedora"]
|
||||||
|
machine = "q35"
|
||||||
|
bios = "seabios"
|
||||||
|
description = "kubernetes VM Template created via iac"
|
||||||
|
|
||||||
cpu {
|
cpu {
|
||||||
cores = each.value.cores
|
cores = each.value.cores
|
||||||
}
|
}
|
||||||
@ -163,9 +169,6 @@ resource "proxmox_virtual_environment_vm" "k8s_vms" {
|
|||||||
interface = "scsi1"
|
interface = "scsi1"
|
||||||
}
|
}
|
||||||
|
|
||||||
clone {
|
|
||||||
vm_id = proxmox_virtual_environment_vm.proxmox-kubernetes-VM-template.id
|
|
||||||
}
|
|
||||||
|
|
||||||
initialization {
|
initialization {
|
||||||
dns {
|
dns {
|
||||||
@ -186,10 +189,17 @@ initialization {
|
|||||||
user_data_file_id = proxmox_virtual_environment_file.vm_user_data[each.key].id
|
user_data_file_id = proxmox_virtual_environment_file.vm_user_data[each.key].id
|
||||||
}
|
}
|
||||||
|
|
||||||
customization {
|
disk {
|
||||||
cicustom = "user=local-snippets:snippets/cloud-init-iac-k8s-${each.key}.yaml"
|
datastore_id = "local-lvm"
|
||||||
|
file_id = proxmox_virtual_environment_download_file.latest_ubunto_cloud_img.id
|
||||||
|
interface = "scsi0"
|
||||||
|
file_format = "qcow2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Configuração da interface de rede
|
||||||
|
network_device {
|
||||||
|
bridge = "vmbr0"
|
||||||
|
}
|
||||||
agent {
|
agent {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user