mirror of
https://gitea.fenix-dev.com/fenix-gitea-admin/iac-opentofu-private.git
synced 2025-10-27 15:53:06 +00:00
disco usando imagem local
This commit is contained in:
18
proxmox.tf
18
proxmox.tf
@ -6,13 +6,6 @@ provider "proxmox" {
|
|||||||
username = "terraform"
|
username = "terraform"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resource "proxmox_virtual_environment_download_file" "fedora_cloud_image" {
|
|
||||||
content_type = "iso"
|
|
||||||
datastore_id = "local"
|
|
||||||
node_name = "fedora"
|
|
||||||
url = "https://dl.fedoraproject.org/pub/fedora/linux/releases/41/Cloud/x86_64/images/Fedora-Cloud-Base-Generic-41-1.4.x86_64.qcow2"
|
|
||||||
file_name = "Fedora-Cloud-Base-41.qcow2.img"
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "proxmox_virtual_environment_file" "fedora_user_data" {
|
resource "proxmox_virtual_environment_file" "fedora_user_data" {
|
||||||
content_type = "snippets"
|
content_type = "snippets"
|
||||||
@ -75,15 +68,14 @@ resource "proxmox_virtual_environment_vm" "proxmox-kubernetes-VM-template" {
|
|||||||
interface = "scsi0"
|
interface = "scsi0"
|
||||||
size = 64
|
size = 64
|
||||||
}
|
}
|
||||||
|
|
||||||
disk {
|
disk {
|
||||||
datastore_id = "local-lvm" # armazenamento para disco da VM
|
datastore_id = "local-lvm"
|
||||||
file_id = proxmox_virtual_environment_download_file.fedora_cloud_image.id
|
file_id = "local:iso/Fedora-Cloud-Base-41.qcow2"
|
||||||
interface = "scsi1"
|
interface = "scsi1"
|
||||||
size = 10
|
size = 10
|
||||||
iothread = true
|
}
|
||||||
discard = "on"
|
|
||||||
}
|
|
||||||
# Configuração da interface de rede
|
# Configuração da interface de rede
|
||||||
network_device {
|
network_device {
|
||||||
bridge = "vmbr0"
|
bridge = "vmbr0"
|
||||||
|
|||||||
Reference in New Issue
Block a user