mirror of
https://github.com/khuedoan/homelab.git
synced 2025-03-12 19:10:14 +07:00
Working lxd container
This commit is contained in:
parent
9348de351f
commit
6d32436039
13
infra/lxd/cluster.tf
Normal file
13
infra/lxd/cluster.tf
Normal file
@ -0,0 +1,13 @@
|
||||
resource "lxd_container" "test1" {
|
||||
name = "test1"
|
||||
image = "ubuntu:20.04"
|
||||
ephemeral = false
|
||||
|
||||
config = {
|
||||
"boot.autostart" = true
|
||||
}
|
||||
|
||||
limits = {
|
||||
cpu = 2
|
||||
}
|
||||
}
|
@ -1,6 +1,26 @@
|
||||
terraform {
|
||||
backend "etcdv3" {
|
||||
endpoints = [ "localhost:2379" ]
|
||||
endpoints = ["localhost:2379"]
|
||||
lock = true
|
||||
}
|
||||
|
||||
required_providers {
|
||||
lxd = {
|
||||
source = "terraform-lxd/lxd"
|
||||
version = "1.5.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "lxd" {
|
||||
generate_client_certificates = true
|
||||
accept_remote_certificate = true
|
||||
|
||||
lxd_remote {
|
||||
name = "local"
|
||||
scheme = "https"
|
||||
address = "192.168.64.4"
|
||||
password = "1"
|
||||
default = true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user