feat: initial commit
- have been working on this for some time now
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
resource "incus_storage_pool" "this" {
|
||||
name = var.name
|
||||
driver = var.driver
|
||||
description = var.description
|
||||
project = var.project
|
||||
config = var.config
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
output "name" {
|
||||
description = "Name of the storage pool"
|
||||
value = incus_storage_pool.this.name
|
||||
}
|
||||
|
||||
output "driver" {
|
||||
description = "Driver used by the storage pool"
|
||||
value = incus_storage_pool.this.driver
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
variable "name" {
|
||||
description = "Name of the storage pool."
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "driver" {
|
||||
description = "Storage Pool driver. Must be one of dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject."
|
||||
type = string
|
||||
validation {
|
||||
condition = contains(["dir", "zfs", "lvm", "btrfs", "ceph", "cephfs", "cephobject"], var.driver)
|
||||
error_message = "Invalid driver. Must be one of: dir, zfs, lvm, btrfs, ceph, cephfs, or cephobject."
|
||||
}
|
||||
}
|
||||
|
||||
variable "description" {
|
||||
description = "Description of the storage pool."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "config" {
|
||||
description = "Map of key/value pairs for storage pool config."
|
||||
type = map(string)
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "project" {
|
||||
description = "Name of the project where the storage pool will be stored."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
incus = {
|
||||
source = "lxc/incus"
|
||||
version = "0.3.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user