ansible_lxd_tests/Playbooks/Manifests/OpenLDAP/main.tf

32 lines
599 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 = "centos"
source_image = "8/amd64"
}
resource "lxd_container" "container1" {
name = "OpenLDAP"
image = lxd_cached_image.image.fingerprint
ephemeral = false
limits = {
cpu = 1
}
}
output "container_ip_address" {
value = lxd_container.container1.ip_address
}
output "container_name" {
value = lxd_container.container1.name
}