feat: initial commit

- have been working on this for some time now
This commit is contained in:
2025-05-30 22:36:55 +10:00
commit cb67816eee
188 changed files with 6145 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
resource "incus_profile" "this" {
name = var.name
description = var.description
project = var.project
config = var.config
dynamic "device" {
for_each = var.devices
content {
name = device.value.name
type = device.value.type
properties = device.value.properties
}
}
}
+4
View File
@@ -0,0 +1,4 @@
output "name" {
description = "Name of the created Incus profile"
value = incus_profile.this.name
}
+37
View File
@@ -0,0 +1,37 @@
variable "name" {
description = "Name of the Incus profile"
type = string
}
variable "description" {
description = "Optional description of the profile"
type = string
default = null
}
variable "project" {
description = "Project where the profile will be created"
type = string
default = null
}
variable "config" {
description = "Map of Incus profile configuration settings"
type = map(string)
default = {}
}
variable "devices" {
description = <<EOT
List of device blocks. Each device is a map with:
- name (string)
- type (string)
- properties (map(string))
EOT
type = list(object({
name = string
type = string
properties = map(string)
}))
default = []
}
+8
View File
@@ -0,0 +1,8 @@
terraform {
required_providers {
incus = {
source = "lxc/incus"
version = "0.3.1"
}
}
}