-
Notifications
You must be signed in to change notification settings - Fork 26
feat: implement advanced search options for images #874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: implement advanced search options for images #874
Conversation
Are there any other datasources in which we might want to re-use this? This could be re-structured to be a general approach. I wouldn't want to duplicate this code in the future. |
2f22ea0
to
39a8de6
Compare
I don't see any other usecase - This seems like a edgecase for a datasource. I also did not reinvent the wheel. I checked the implementation of gcp and azure. |
867439b
to
d0e15f9
Compare
d0e15f9
to
686d03a
Compare
Description
This PR improves the
stackit_image
data source by enabling image selection via name, regex, or detailed filters (OS, distro, version, UEFI, and secure_boot). When multiple results match (e.g., Ubuntu 18.04, 20.04...), they are sorted descending by name, selecting the newest. Similar to Azure’s behavior.The design aligns with syntax and behavior from other providers like Azure, Google, and OpenStack.
Unlike Google/OpenStack, we avoid relying on
most_recent
or timestamps (created_at
,updated_at
) since these refer to upload/update events—not actual image creation by the vendor. Instead, we sort by name/system version to reliably select the latest version.Code to test it:
Checklist
make fmt
examples/
directory)make generate-docs
(will be checked by CI)make test
(will be checked by CI)make lint
(will be checked by CI)