feat: initial commit
- have been working on this for some time now
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
resource "incus_network" "this" {
|
||||
name = var.name
|
||||
type = var.type
|
||||
config = var.config
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
variable "name" {
|
||||
type = string
|
||||
description = "The name of the network to define"
|
||||
}
|
||||
|
||||
variable "type" {
|
||||
description = <<EOT
|
||||
(Optional) The type of network to create.
|
||||
Can be one of: bridge, macvlan, sriov, ovn, or physical.
|
||||
If no type is specified, a bridge network is created.
|
||||
EOT
|
||||
|
||||
type = string
|
||||
default = "bridge"
|
||||
validation {
|
||||
condition = contains(["bridge", "macvlan", "sriov", "ovn", "physical"], var.type)
|
||||
error_message = "Type must be one of: bridge, macvlan, sriov, ovn, or physical."
|
||||
}
|
||||
}
|
||||
|
||||
variable "config" {
|
||||
description = "(Optional) Map of key/value pairs of network config settings."
|
||||
type = map(string)
|
||||
default = {}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
incus = {
|
||||
source = "lxc/incus"
|
||||
version = "0.3.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user