While currently debugging an issue with using the xenorchestra_vdi data source, I realized that when results are not found the error is silently ignored. This causes an issue when the dependent terraform code tries to read the data source's attribute values like so.
Error: "cdrom.0.id": required field is not set
on devbox.tf line 14, in resource "xenorchestra_vm" "devbox":
14: resource "xenorchestra_vm" "devbox" {
For resources this behavior is correct because it will need to be created if it doesn't exist, however, since data sources are supposed to identify infrastructure that already exists this is a bug.
While currently debugging an issue with using the
xenorchestra_vdi
data source, I realized that when results are not found the error is silently ignored. This causes an issue when the dependent terraform code tries to read the data source's attribute values like so.For resources this behavior is correct because it will need to be created if it doesn't exist, however, since data sources are supposed to identify infrastructure that already exists this is a bug.