Summary
Custom templates created in Xelon HQ are usable to create devices, but the xelon_template data source cannot discover them by name because the provider uses GET /templates / Templates.List, which appears to return the built-in catalog only.
Environment
- Terraform:
1.14.8
- Provider:
Xelon-AG/xelon v1.3.2
- Platform:
darwin_arm64
- Cloud: Zurich public cloud
Reproduction
- Create a VM from an uploaded ISO in Xelon HQ.
- Shut down the VM.
- In the HQ UI, create a custom template from the VM named
vyos-manual-iso-template.
- Create a test VM from that custom template in the HQ UI.
- Query the device details through the API.
The device details include a template object similar to:
{
"template": {
"identifier": "<custom-template-id>",
"type": "Custom",
"hasServiceUser": false,
"extendPartitionAllowed": false,
"editNetworkAllowed": false
}
}
This confirms the custom template exists and can be used.
However, searching/listing templates does not return it:
curl -H "Authorization: Bearer <token>" \
-H "X-User-Id: <client-id>" \
"https://hq.xelon.ch/api/v2/templates?search=vyos-manual-iso-template&perPage=100"
The response contains no matching custom template. Similar searches with search=vyos, search=manual, type=Custom, and type=custom also did not return the UI-created custom template.
Terraform Impact
The xelon_template data source searches by name using Templates.List:
data "xelon_template" "vyos" {
name = "vyos-manual-iso-template"
}
Expected: the custom template is found by name.
Actual: the data source cannot find the custom template, so Terraform users must discover the custom template ID indirectly through a device created from it or through the UI.
Expected Behavior
One of these would make the provider usable for custom templates:
GET /templates includes custom templates visible to the tenant, or
- the provider uses an endpoint that includes custom templates for the current tenant, or
- the provider documents that
data.xelon_template only supports catalog templates and not HQ custom templates.
Workaround
Create a device manually from the custom template, query that device's API details, and copy template.identifier into Terraform as a variable:
variable "vyos_template_id" {
default = "<custom-template-id>"
}
resource "xelon_device" "vyos" {
template_id = var.vyos_template_id
# ...
}
Impact
This breaks a natural Terraform workflow for custom ISO/template users:
- create custom template in HQ,
- look it up by name with
data.xelon_template,
- create devices from it.
The template is real and usable, but not discoverable through the provider's data source.
Summary
Custom templates created in Xelon HQ are usable to create devices, but the
xelon_templatedata source cannot discover them by name because the provider usesGET /templates/Templates.List, which appears to return the built-in catalog only.Environment
1.14.8Xelon-AG/xelon v1.3.2darwin_arm64Reproduction
vyos-manual-iso-template.The device details include a template object similar to:
{ "template": { "identifier": "<custom-template-id>", "type": "Custom", "hasServiceUser": false, "extendPartitionAllowed": false, "editNetworkAllowed": false } }This confirms the custom template exists and can be used.
However, searching/listing templates does not return it:
The response contains no matching custom template. Similar searches with
search=vyos,search=manual,type=Custom, andtype=customalso did not return the UI-created custom template.Terraform Impact
The
xelon_templatedata source searches by name usingTemplates.List:Expected: the custom template is found by name.
Actual: the data source cannot find the custom template, so Terraform users must discover the custom template ID indirectly through a device created from it or through the UI.
Expected Behavior
One of these would make the provider usable for custom templates:
GET /templatesincludes custom templates visible to the tenant, ordata.xelon_templateonly supports catalog templates and not HQ custom templates.Workaround
Create a device manually from the custom template, query that device's API details, and copy
template.identifierinto Terraform as a variable:Impact
This breaks a natural Terraform workflow for custom ISO/template users:
data.xelon_template,The template is real and usable, but not discoverable through the provider's data source.