2022-07-28 20:52:07 -03:00
|
|
|
terraform {
|
|
|
|
required_providers {
|
|
|
|
lxd = {
|
|
|
|
source = "terraform-lxd/lxd"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
provider "lxd" {
|
|
|
|
generate_client_certificates = true
|
|
|
|
accept_remote_certificate = true
|
|
|
|
}
|
|
|
|
|
2022-08-05 01:34:36 -03:00
|
|
|
resource "lxd_cached_image" "image" {
|
2022-07-28 20:52:07 -03:00
|
|
|
source_remote = "ubuntu"
|
|
|
|
source_image = "focal/amd64"
|
|
|
|
}
|
2022-08-05 01:34:36 -03:00
|
|
|
resource "lxd_container" "container1" {
|
|
|
|
name = "PHPLDAPAdmin"
|
|
|
|
image = lxd_cached_image.image.fingerprint
|
2022-07-28 20:52:07 -03:00
|
|
|
ephemeral = false
|
2022-08-05 01:34:36 -03:00
|
|
|
config = {
|
2022-07-28 20:52:07 -03:00
|
|
|
"boot.autostart" = true
|
|
|
|
}
|
|
|
|
limits = {
|
|
|
|
cpu = 2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|