Problem description
I'm implementing a STACKIT compute resource integration for Foreman via foreman_opentofu. Foreman needs to discover all available machine types and present them to the user when configuring and provisioning hosts.
Currently, there is no data source that returns the complete list of available machine types.
Proposed solution
Add a stackit_machine_types data source that returns all available machine types.
data "stackit_machine_types" "available" {
project_id = var.project_id
}
output "machine_types" {
value = data.stackit_machine_types.available.machine_types
}
Alternative solutions (optional)
The machine types could be retrieved externally via the STACKIT API/CLI, but this requires additional logic outside Terraform/OpenTofu.
Additional information
Other compute resources supported by Foreman provide machine type/flavor enumeration, so this would make the STACKIT integration consistent with them.
Problem description
I'm implementing a STACKIT compute resource integration for Foreman via foreman_opentofu. Foreman needs to discover all available machine types and present them to the user when configuring and provisioning hosts.
Currently, there is no data source that returns the complete list of available machine types.
Proposed solution
Add a
stackit_machine_typesdata source that returns all available machine types.Alternative solutions (optional)
The machine types could be retrieved externally via the STACKIT API/CLI, but this requires additional logic outside Terraform/OpenTofu.
Additional information
Other compute resources supported by Foreman provide machine type/flavor enumeration, so this would make the STACKIT integration consistent with them.