A Terraform provider for managing TrueNAS SCALE and Community editions.
terraform {
required_providers {
truenas = {
source = "deevus/truenas"
version = "~> 0.1"
}
}
}provider "truenas" {
host = "192.168.1.100"
auth_method = "ssh"
ssh {
user = "terraform"
private_key = file("~/.ssh/terraform_ed25519")
host_key_fingerprint = "SHA256:..." # ssh-keyscan <host> | ssh-keygen -lf -
}
}
# Create a dataset
resource "truenas_dataset" "example" {
pool = "tank"
name = "example"
}- Data Sources: Query pools and datasets
- Resources: Manage datasets, host paths, files, and applications
Full documentation is available on the Terraform Registry.
- TrueNAS SCALE or TrueNAS Community
- SSH access with a user configured for
midclt,rm, andrmdir(see User Setup)
Need help deploying terraform-provider-truenas at your org? I offer implementation support, custom development, and training through my consultancy: simonhartcher.com. Email in bio.
MIT License - see LICENSE for details.