sylve_download (Resource)
A file Sylve has fetched or registered for use as VM/jail install media: an ISO, a cloud image, or a jail base rootfs archive. Referenced by sylve_vm’s iso attribute (not yet implemented in this provider) via this resource’s uuid. terraform apply blocks until the download reaches a terminal state (up to 30 minutes) – there is no way to make this asynchronous within a single apply.
Example Usage
# An HTTP-sourced cloud image.
resource "sylve_download" "debian" {
url = "https://cloud.debian.org/images/cloud/trixie/latest/debian-13-genericcloud-amd64.raw"
utype = "cloud-init"
}
# A jail base rootfs archive, auto-extracted after download.
resource "sylve_download" "freebsd_base" {
url = "https://download.freebsd.org/releases/amd64/15.1-RELEASE/base.txz"
utype = "base-rootfs"
automatic_extraction = true
}
# An already-present local file, registered with no network fetch at
# all -- Sylve auto-detects this from the shape of `url` (an absolute
# filesystem path, rather than a URL or magnet URI).
resource "sylve_download" "local_iso" {
url = "/path/on/the/sylve/host/custom.iso"
}
Schema
Required
url(String) Source, auto-classified by Sylve from its shape: a magnet URI becomes a torrent download, an http(s) URL becomes an HTTP download, and an absolute filesystem path already present on the Sylve host is copied/registered locally with no network fetch at all. Immutable; changing it recreates the resource (there is no update endpoint for a download’s source).
Optional
automatic_extraction(Boolean) Automatically extract a compressed download (e.g. .xz/.gz) after fetch. Immutable.automatic_raw_conversion(Boolean) Automatically convert a cloud image (e.g. qcow2) to raw after fetch. Immutable.filename(String) Destination filename. Defaults to the URL/path’s own basename. Immutable.ignore_tls(Boolean) Skip TLS certificate verification for an https:// url. Immutable.utype(String) “base-rootfs” (jail base archive), “cloud-init” (cloud-init-capable image, referenceable by a VM with cloud_init enabled), or “uncategorized” (default – as of Sylve v0.3.0; v0.2.3 spelled this same value “uncategoried”, a real upstream typo fixed in v0.3.0, not a typo introduced here. Not validated client-side, same as this provider’s other enum-shaped attributes – an invalid value is rejected server-side instead). Immutable.
Read-Only
id(String) Terraform resource identity – the download’s numeric ID as a string.path(String) Final file path on the Sylve host.size(Number) File size in bytes, once known.type(String) Server-detected source kind: “http”, “torrent”, or “path”.uuid(String) Sylve’s UUID for this download – what a VM’s iso attribute references.