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'
The response is a map with the image label in key and an array of compatible images in value:
{
"ubuntu-bionic": [ // Image label that can be used in terraform and Go SDK.
{
"compatible_commercial_types": [ // Instance types that are compatible with this image.
"DEV1-S",
"DEV1-M"
],
"arch": "x86_64", // Architectures that are compatible with this image.
"id": "f974feac-abae-4365-b988-8ec7d1cec10d", // UUID of the image.
"zone": "fr-par-1" // Zone in which the image is available.
},
{
"compatible_commercial_types": [
"C1"
],
"arch": "arm",
"id": "f63fe42a-900f-4a5e-ba99-ab0e59469b7e",
"zone": "fr-par-1"
},
// ...
]
}
To run this command, curl
, jq
and sed
are required.
Merci Quentin !