Skip to content

Replace VS Code Tasks using glpex with direct gcloud commands

At present, the VS Code Tasks for starting/stopping GCP instances use glplex, which is a custom Python script vibe-refactored from a custom Ruby script that I wrote to ease managing multiple GCP instances with complicated names (as well as to ease automatic shutdown of instances at the end of the day). It is able to operate on multiple instances by using patterns, but one must know the patterns to match.

Better would be to use fzf to list the eligible instances for an operation, and then select from them to perform the action. The fuzzy-finder allows multi-select, so this would also be preferable to using glob patterns in most cases.

For the VS Code tasks, replace the inputs which select using a string to enter the pattern, with scripts which use fzf to retrieve the list of instances for the operation