31 lines
No EOL
565 B
HCL
31 lines
No EOL
565 B
HCL
terraform {
|
|
required_providers {
|
|
lxd = {
|
|
source = "terraform-lxd/lxd"
|
|
}
|
|
}
|
|
}
|
|
provider "lxd" {
|
|
generate_client_certificates = true
|
|
accept_remote_certificate = true
|
|
}
|
|
|
|
resource "lxd_cached_image" "image" {
|
|
source_remote = "ubuntu"
|
|
source_image = "focal/amd64"
|
|
}
|
|
resource "lxd_container" "container1" {
|
|
name = "OpenLDAP"
|
|
image = lxd_cached_image.image.fingerprint
|
|
ephemeral = false
|
|
config = {
|
|
"boot.autostart" = true
|
|
}
|
|
limits = {
|
|
cpu = 2
|
|
}
|
|
}
|
|
|
|
output "container_info" {
|
|
value = lxd_container.container1
|
|
} |