diff --git a/devserver/terraform/list-images.sh b/devserver/terraform/list-images.sh new file mode 100755 index 0000000..93c1ba5 --- /dev/null +++ b/devserver/terraform/list-images.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +: "${TF_VAR_do_token:?TF_VAR_do_token must be set}" + +curl -s \ + "https://api.digitalocean.com/v2/images?type=distribution&per_page=200" \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer ${TF_VAR_do_token}" | jq -r '.images[].slug'