terraform-provider-truenas
terraform-provider-truenas copied to clipboard
How to use resource truenas_dataset for nested DS were levels > 2
Howdy. Curious if you can provide an example of how one might specify DataSet nesting > 2 using the truenas_dataset
resource?
This works great for <= 2:
resource "truenas_dataset" "Sync" {
pool = "<redacted>"
name = "Sync"
compression = "off"
sync = "inherit"
atime = "off"
deduplication = "off"
readonly = "off"
}
resource "truenas_dataset" "Media" {
pool = "<redacted>"
parent = "Sync"
name = "Media"
compression = "off"
sync = "inherit"
atime = "off"
deduplication = "off"
readonly = "off"
depends_on = [
truenas_dataset.Sync
]
}
However, things get a little less clear once you do deeper. For example: /
resource "truenas_dataset" "Movies" {
pool = "<redacted>"
parent = "Media" # <- What should go here? ex: '/<pool>/Sync'?
name = "Movies"
compression = "off"
sync = "inherit"
atime = "off"
deduplication = "off"
readonly = "off"
depends_on = [
truenas_dataset.Media # <- What about here?
]
}
Thanks for any insight you can share.