diff options
| author | jerome <jerome@xlinfo.fr> | 2025-08-18 11:22:14 +0200 |
|---|---|---|
| committer | jerome <jerome@xlinfo.fr> | 2025-08-18 11:22:14 +0200 |
| commit | 4293df73e636a3bb9097d4cbe80ae8c194862f6b (patch) | |
| tree | c7cbf89deac7fcbc85850938b7c926778999c9bc /final/main.tf | |
| download | incus-4293df73e636a3bb9097d4cbe80ae8c194862f6b.tar.gz incus-4293df73e636a3bb9097d4cbe80ae8c194862f6b.zip | |
commit initial
Diffstat (limited to 'final/main.tf')
| -rw-r--r-- | final/main.tf | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/final/main.tf b/final/main.tf new file mode 100644 index 0000000..8c90bfc --- /dev/null +++ b/final/main.tf @@ -0,0 +1,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 = "/" + } + } +} + + |
