blob: 8c90bfc79d4e425a6130ce69582d8f618b1bdde4 (
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
40
41
42
43
44
45
46
47
|
terraform {
required_providers {
incus = {
source = "lxc/incus"
version = "0.3.1"
}
}
}
provider "incus" {
# Configuration options
}
data "template_file" "cloud-init" {
template = file("${path.module}/cloud-init.yaml")
}
resource "incus_project" "lamp" {
name = "lamp"
description = "terraform - cloud-init - ansible"
}
resource "incus_profile" "lamp" {
project = "lamp"
name = "default"
config = {
"cloud-init.user-data" = data.template_file.cloud-init.rendered
}
device {
type = "nic"
name = "eth0"
properties = {
nictype = "bridged"
parent = "br0"
}
}
device {
type = "disk"
name = "root"
properties = {
pool = "default"
path = "/"
}
}
}
|