add services VM #2
96
infrastructure/service.tf
Normal file
96
infrastructure/service.tf
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
# proxmox_virtual_environment_vm.devops:
|
||||||
|
resource "proxmox_virtual_environment_vm" "services" {
|
||||||
|
acpi = true
|
||||||
|
vm_id = "114"
|
||||||
|
machine = "q35"
|
||||||
|
name = "services"
|
||||||
|
node_name = "proxmox"
|
||||||
|
scsi_hardware = "virtio-scsi-pci"
|
||||||
|
started = true
|
||||||
|
tablet_device = false
|
||||||
|
tags = []
|
||||||
|
template = false
|
||||||
|
|
||||||
|
clone {
|
||||||
|
vm_id = 9999
|
||||||
|
}
|
||||||
|
|
||||||
|
agent {
|
||||||
|
enabled = true
|
||||||
|
timeout = "15m"
|
||||||
|
trim = false
|
||||||
|
type = "virtio"
|
||||||
|
}
|
||||||
|
|
||||||
|
cpu {
|
||||||
|
cores = 2
|
||||||
|
flags = []
|
||||||
|
hotplugged = 0
|
||||||
|
numa = false
|
||||||
|
sockets = 1
|
||||||
|
type = "host"
|
||||||
|
units = 1024
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
disk {
|
||||||
|
datastore_id = "local"
|
||||||
|
size = 30
|
||||||
|
ssd = true
|
||||||
|
iothread = true
|
||||||
|
interface = "scsi0"
|
||||||
|
}
|
||||||
|
|
||||||
|
initialization {
|
||||||
|
datastore_id = "local"
|
||||||
|
interface = "ide2"
|
||||||
|
|
||||||
|
ip_config {
|
||||||
|
ipv4 {
|
||||||
|
address = "10.20.1.9/16"
|
||||||
|
gateway = "10.20.0.1"
|
||||||
|
}
|
||||||
|
ipv6 {
|
||||||
|
address = "auto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
user_account {
|
||||||
|
keys = var.virtual_environment_sshkeys
|
||||||
|
username = "tim"
|
||||||
|
password = random_password.devops_vm_password.result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
memory {
|
||||||
|
dedicated = 4096
|
||||||
|
floating = 0
|
||||||
|
shared = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
network_device {
|
||||||
|
bridge = "vmbr0"
|
||||||
|
enabled = true
|
||||||
|
firewall = false
|
||||||
|
model = "virtio"
|
||||||
|
mtu = 0
|
||||||
|
rate_limit = 0
|
||||||
|
vlan_id = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
vga {
|
||||||
|
enabled = true
|
||||||
|
memory = 16
|
||||||
|
type = "std"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resource "random_password" "services_vm_password" {
|
||||||
|
length = 16
|
||||||
|
override_special = "_%@"
|
||||||
|
special = true
|
||||||
|
}
|
||||||
|
|
||||||
|
output "services_vm_password" {
|
||||||
|
value = random_password.devops_vm_password.result
|
||||||
|
sensitive = true
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user