-
Notifications
You must be signed in to change notification settings - Fork 0
/
resource.tf
92 lines (84 loc) · 2.37 KB
/
resource.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
resource "proxmox_lxc" "proxmox_container" {
# meta config
description = var.description
hostname = var.hostname
password = var.password
ssh_public_keys = var.ssh_public_keys
tags = var.tags
target_node = var.target_node
vmid = var.vmid
# hardware config
arch = var.arch
bwlimit = var.bwlimit
cmode = var.cmode
console = var.console
cores = var.cores
cpulimit = var.cpulimit
cpuunits = var.cpuunits
memory = var.memory
swap = var.swap
tty = var.tty
rootfs {
size = var.rootfs_size
storage = var.rootfs_storage
}
dynamic "mountpoint" {
for_each = var.mountpoints
content {
acl = mountpoint.value.acl
backup = mountpoint.value.backup
key = mountpoint.value.key
mp = mountpoint.value.mp
quota = mountpoint.value.quota
replicate = mountpoint.value.replicate
size = mountpoint.value.size
shared = mountpoint.value.shared
slot = mountpoint.value.slot
storage = mountpoint.value.storage
}
}
# network config
nameserver = var.nameserver
searchdomain = var.searchdomain
unique = var.unique
dynamic "network" {
for_each = var.networks
content {
bridge = network.value.bridge
firewall = network.value.firewall
gw = network.value.gw
gw6 = network.value.gw6
hwaddr = network.value.hwaddr
ip = network.value.ip
ip6 = network.value.ip6
mtu = network.value.mtu
name = network.value.name
rate = network.value.rate
tag = network.value.tag
}
}
# PVE config
hastate = var.hastate
hagroup = var.hagroup
hookscript = var.hookscript
onboot = var.onboot
ostype = var.ostype
pool = var.pool
protection = var.protection
restore = var.restore
start = var.start
unprivileged = var.unprivileged
features {
fuse = var.features_fuse
keyctl = var.features_keyctl
mount = var.features_mount
nesting = var.features_nesting
}
# image config
clone = var.clone
clone_storage = var.clone_storage
full = var.full
ignore_unpack_errors = var.ignore_unpack_errors
ostemplate = var.ostemplate
template = var.template
}