blob: 7a29dd1ae3130d578628d1d28d559393f1c721f6 (
plain)
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
|
terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
version = ">=2.0.0"
}
}
}
provider "proxmox" {
# Configuration options
#pm_tls_insecure = true
pm_api_url = "https://pve.xlinfo.fr:8006/api2/json"
#pm_user = "root@pam"
#pm_password = "secret"
pm_api_token_id = "root@pam!terraform"
pm_api_token_secret = "a60b267c-5211-4090-bffd-12178f120840"
}
resource "proxmox_lxc" "basic" {
target_node = "pve"
hostname = "alpine"
ostemplate = "local:vztmpl/alpine-3.17-default_20221129_amd64.tar.xz"
password = "secret"
unprivileged = true
start = true
// Terraform will crash without rootfs defined
rootfs {
storage = "local-lvm"
size = "8G"
}
network {
name = "eth0"
bridge = "vmbr0"
ip = "dhcp"
}
}
|