feat: initial commit
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
proxmox = {
|
||||
source = "bpg/proxmox"
|
||||
version = "0.68.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "proxmox" {
|
||||
endpoint = "https://10.0.50.110:8006/"
|
||||
insecure = true
|
||||
api_token = trimspace(file("${path.module}/.secrets/api_token"))
|
||||
}
|
||||
|
||||
resource "proxmox_virtual_environment_vm" "testvm" {
|
||||
name = "terraform-testvm-1"
|
||||
node_name = "rbmk2"
|
||||
|
||||
clone {
|
||||
vm_id = 169
|
||||
full = true
|
||||
datastore_id = "local-lvm"
|
||||
}
|
||||
|
||||
cpu {
|
||||
sockets = 1
|
||||
cores = 2
|
||||
}
|
||||
|
||||
memory {
|
||||
dedicated = 8192
|
||||
}
|
||||
|
||||
network_device {
|
||||
model = "virtio"
|
||||
bridge = "vmbr0"
|
||||
}
|
||||
|
||||
initialization {
|
||||
datastore_id = "local-lvm"
|
||||
|
||||
user_account {
|
||||
username = "devops"
|
||||
keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFyVe1ZhUCVs9imt0UmcCIXRAHpoSKFQ7IH/ekEXohZG dzoni-wolkabout"
|
||||
]
|
||||
}
|
||||
|
||||
ip_config {
|
||||
ipv4 {
|
||||
address = "10.1.50.125/24"
|
||||
gateway = "10.1.50.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
agent {
|
||||
enabled = true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user