Files
learn-devops/opentofu/test_vm/vm-01.tf
github-actions[bot] 346360f820 Upgrade bpg/proxmox (#3)
* Update readme

* Update gitignore

* Upgrade vm_id

* Upgrade bpg/proxmox

---------

Co-authored-by: Fedor Batonogov <f.batonogov@yandex.ru>
2024-04-25 17:45:59 +03:00

68 lines
1.2 KiB
HCL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Машинка
resource "proxmox_virtual_environment_vm" "vm-01" {
name = "vm-01"
migrate = true
description = "Managed by OpenTofu"
tags = ["opentofu", "test"]
on_boot = true
# Указываем целевой узел, на котором будет запущена ВМ
node_name = "pve-01"
# Шоблон из которого будет создавать ВМ
clone {
vm_id = "2204"
node_name = "pve-01"
retries = 2
}
# Активируем QEMU для этов ВМ
agent {
enabled = true
}
operating_system {
type = "l26"
}
cpu {
cores = 4
type = "host"
numa = true
}
memory {
dedicated = 4096
}
disk {
size = "40"
interface = "virtio0"
datastore_id = "proxmox-data-02"
file_format = "raw"
}
network_device {
bridge = "vmbr0"
model = "virtio"
}
initialization {
datastore_id = "proxmox-data-02"
ip_config {
ipv4 {
address = "dhcp"
}
}
dns {
servers = ["77.88.8.8"]
}
user_account {
username = "infra"
keys = [
"ssh-rsa..."
]
}
}
}