forked from thesheff17/tf_examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
full-clone.tf
65 lines (51 loc) · 1.34 KB
/
full-clone.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Proxmox Full-Clone
# ---
# Create a new VM from a clone
# enter the the name of the new device
resource "proxmox_vm_qemu" "testing02" {
# VM General Settings
# which proxmox server should this be launched on?
target_node = "node01"
# make sure this ID is unqiue. If you reuse ID's you will get errors :)
vmid = "103"
# name of the new device again
name = "testing02"
desc = "Description"
# VM Advanced General Settings
onboot = true
# VM OS Settings
clone = "VM 9000"
# make sure to install qemu-guest-agent on image cloning
# otherwise terafform will hang creating the vm
agent = 1
# VM CPU Settings
# set cpu cores
cores = 4
sockets = 1
cpu = "host"
# VM Memory Settings
# how much ram?
memory = 4096
# VM Network Settings
network {
bridge = "vmbr0"
model = "virtio"
}
# how big for the disk image?
disk {
storage = "local-lvm"
type = "virtio"
size = "8G"
}
# VM Cloud-Init Settings
os_type = "cloud-init"
# (Optional) IP Address and Gateway
# set to your network
# ipconfig0 = "ip=192.168.1.7/24,gw=192.168.1.1"
# (Optional) Default User
ciuser = "ubuntu"
# (Optional) Add your SSH KEY
sshkeys = <<EOF
YOUR_PUBLIC_SSH_KEY_FROM_ANSIBLE_SERVER
EOF
}