LXD Resource provider for Terraform
This provider is published in the Terraform Registry.
Follow the official instructions for declaring providers in your Terraform configuration here.
Add the following to your Terraform configuration:
terraform {
required_providers {
lxd = {
source = "terraform-lxd/lxd"
}
}
}
git clone ...
cd terraform-provider-lxd
go build -v
~/.terraformrc
) to use the development binary provider:$ cat ~/.terraformrc
provider_installation {
# Use local git clone of LXD provider
dev_overrides {
"terraform-lxd/lxd" = "/home/<REPLACE_ME>/git/terraform-provider-lxd"
}
# For all other providers, install them directly from their origin provider
# registries as normal. If you omit this, Terraform will _only_ use
# the dev_overrides block, and so no other providers will be available.
direct {}
}
There are two test suites, unit and acceptance. By default the acceptance tests are not run as they require a functional LXD environment.
make
make acc
# or run an individual test
TESTARGS="-run TestAccCachedImage_basicVM" make testacc
# increase test verbosity. options are trace, debug, info, warn, or error (default)
TF_LOG=info make testacc
Full documentation can be found in the docs
directory.
Some recognition for great contributors to this project: