mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 15:53:06 +00:00
Update proxmox.tf
This commit is contained in:
16
proxmox.tf
16
proxmox.tf
@ -16,8 +16,18 @@ provider "proxmox" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
resource "proxmox_virtual_environment_download_file" "latest_fedora_cloud_img" {
|
||||||
|
content_type = "import"
|
||||||
|
datastore_id = "local"
|
||||||
|
node_name = "fenix"
|
||||||
|
url = "https://mirror.i3d.net/pub/fedora/linux/releases/42/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-42-1.1.x86_64.qcow2"
|
||||||
|
# need to rename the file to *.qcow2 to indicate the actual file format for import
|
||||||
|
file_name = "Fedora-Cloud-Base-Generic-42-1.1.qcow2"
|
||||||
|
}
|
||||||
|
|
||||||
resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
|
resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
|
||||||
|
|
||||||
|
depends_on = [proxmox_virtual_environment_download_file.latest_fedora_cloud_img]
|
||||||
name = "proxmox-kubernetes-VM-template"
|
name = "proxmox-kubernetes-VM-template"
|
||||||
node_name = "fenix"
|
node_name = "fenix"
|
||||||
vm_id = 1002
|
vm_id = 1002
|
||||||
@ -47,12 +57,12 @@ resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
|
|||||||
size = 64
|
size = 64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
disk {
|
disk {
|
||||||
datastore_id = "local-lvm"
|
datastore_id = "local-lvm"
|
||||||
storage = "local-lvm:vm-107-disk-0" # disco QCOW2 importado
|
import_from = proxmox_virtual_environment_download_file.latest_fedora_cloud_img.id
|
||||||
interface = "scsi1"
|
interface = "scsi1"
|
||||||
size = 10
|
}
|
||||||
}
|
|
||||||
|
|
||||||
# Configuração da interface de rede
|
# Configuração da interface de rede
|
||||||
network_device {
|
network_device {
|
||||||
|
|||||||
Reference in New Issue
Block a user