feat: initial commit
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
provider "proxmox" {
|
||||
endpoint = var.proxmox_endpoint
|
||||
insecure = var.proxmox_insecure
|
||||
api_token = trimspace(file(var.proxmox_api_token_file))
|
||||
}
|
||||
|
||||
resource "proxmox_virtual_environment_vm" "wazuh" {
|
||||
name = var.vm_name
|
||||
vm_id = var.vm_id
|
||||
node_name = var.proxmox_node_name
|
||||
|
||||
clone {
|
||||
vm_id = var.proxmox_template_vm_id
|
||||
full = true
|
||||
datastore_id = var.proxmox_datastore_id
|
||||
}
|
||||
|
||||
cpu {
|
||||
sockets = var.vm_cpu_sockets
|
||||
cores = var.vm_cpu_cores
|
||||
}
|
||||
|
||||
memory {
|
||||
dedicated = var.vm_memory_mb
|
||||
}
|
||||
|
||||
network_device {
|
||||
model = "virtio"
|
||||
bridge = var.proxmox_bridge
|
||||
}
|
||||
|
||||
initialization {
|
||||
datastore_id = var.proxmox_datastore_id
|
||||
|
||||
user_account {
|
||||
username = var.vm_ssh_username
|
||||
keys = [var.vm_ssh_public_key]
|
||||
}
|
||||
|
||||
ip_config {
|
||||
ipv4 {
|
||||
address = var.vm_ipv4_cidr
|
||||
gateway = var.vm_gateway
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
agent {
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user