Skip to content

Instantly share code, notes, and snippets.

View rafalf's full-sized avatar

Rafal Fusik rafalf

  • freelancer
  • Dublin
View GitHub Profile
@QuentinBrosse
QuentinBrosse / image-id-by-label.md
Last active August 9, 2021 12:24
Find Scaleway Image ID by Label

Find Scaleway Image ID by Label

It could be difficult to find a Scaleway image ID for the right zone, architecture, and instance type. The Scaleway marketplace API has an endpoint dedicated to that but it could be difficult to understand the response and to find the right image UUID.

Here is a bash command that returns a JSON with just the necessary information needed to find your image ID.

curl -s 'https://api-marketplace.scaleway.com/images?page=1&per_page=100' | sed 's/par1/fr-par-1/g; s/ams1/nl-ams-1/g' | jq '.images | map({"key": .label | gsub("_";"-"), "value": .versions[0].local_images}) | from_entries'