The Unikraft Cloud provider allows Terraform to manage unikernel instances on Unikraft Cloud.
Please refer to the ukc provider documentation in the Terraform Registry.
This provider is built on top of the Terraform Plugin Framework.
If you are unfamiliar with the framework, or with extending Terraform with providers in general, we recommend looking into the Custom Framework Providers tutorial on the HashiCorp Developer portal as a starting point.
Terraform usually installs providers by downloading them from a registry. However, it can be configured to use a local development build of the provider, which allows skipping the version and checksum checks typically performed against release builds.
To achieve this, add a dev_overrides entry to your ~/.terraformrc configuration file:
provider_installation {
dev_overrides {
# The value is the path of $GOBIN (or $GOPATH/bin)
"unikraft.cloud/dev/ukc" = "/home/myuser/go/bin"
}
# 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 {}
}Note
We deliberately use the provider address unikraft.cloud/dev/ukc instead of
registry.terraform.io/unikraft-cloud/ukc in a development context. This allows switching more conveniently
between the local development build and the release build of this provider.
Terraform will now resolve the provider source kraft.cloud/dev/ukc to the local development build, instead of
the remote provider from the Terraform Registry, such as in the example below:
terraform {
required_providers {
ukc = {
source = "kraft.cloud/dev/ukc"
}
}
}The documentation of this provider, including its resources and data sources, is generated using the tfplugindocs CLI
tool.
To run the documentation generator, execute the go generate command. The output is written to the docs/ directory.
The generator uses the templates from the templates/ directory and the following data to populate the provider's
documentation pages:
- Examples inside the
examples/directory - Schema information from the provider, resources, and data sources