Skip to content

Commit ae8d80e

Browse files
committed
Add step to delete cloudscale server groups during decommissioning
1 parent 2f893c2 commit ae8d80e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/modules/ROOT/pages/how-tos/cloudscale/decommission.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,22 @@ terraform destroy
132132
popd
133133
----
134134

135+
. Delete cloudscale server groups
136+
+
137+
TIP: This may not fully clean up server groups for cloudscale clusters which were created earlier than 2025-10-21.
138+
+
139+
[source,bash]
140+
----
141+
for server_group_uuid in $(curl -H"Authorization: Bearer ${CLOUDSCALE_API_TOKEN}" \
142+
https://api.cloudscale.ch/v1/server-groups | \
143+
jq --arg cluster_id "${CLUSTER_ID}" \
144+
'.[]|select(.name|startswith($cluster_id))|.uuid'); do
145+
curl -H"Authorization: Bearer ${CLOUDSCALE_API_TOKEN}" \
146+
"https://api.cloudscale.ch/v1/server-groups/${server_group_uuid}" \
147+
-XDELETE
148+
done
149+
----
150+
135151
. After all resources are deleted we need to remove the buckets
136152
+
137153
[source,bash]

0 commit comments

Comments
 (0)