Hi,
I’ve been trying to create instances declaratively using YAML files with incus create, but I noticed that only some fields are read from the YAML input.
When running:
sudo incus create my-container-image container-name < config.yaml
Some fields are read from YAML:
-
config -
profiles(unless-por--no-profilesflags are used) -
devices -
description(unless--descriptionflag is used)
But others like ephemeral (requires –ephemeral flag) and stateful are not.
Sources:
- incus/cmd/incus/create.go at main · lxc/incus · GitHub
- incus/shared/api/instance.go at main · lxc/incus · GitHub
Is this the expected behavior? If so, is there a design reason why those fields aren’t read from YAML? Would supporting this be a welcome feature request? Maybe a separate command for full declarative instance management could be interesting, similar to kubectl apply -f, or that is not the goal?