In order to save money, I'm using az synapse sql pool pause
and az synapse sql pool resume
, so that the Synapse dedicated pool database only turns on to run tests when there is a Pull Request, then shuts down after.
The challenge is that:
az synapse sql pool resume
fails is the database is already resumed, andaz synapse sql pool pause
fails if the database is already paused
below is an example output of what happens when one of the above situation occurs
Command group 'synapse' is in preview and under development.
Reference and support levels: https://aka.ms/CLI_refstatus
Deployment failed.
Correlation ID: 062ea436-f0f0-4c11-a3e4-4df92cdaf6b5.
An unexpected error occured while processing the request.
Tracking ID: 'ba5ce906-5631-42ad-b3f4-a659095bdbe3'
Exited with code exit status 1
How can I make this command tolerate the state already being achieved?