Skip to content

Instantly share code, notes, and snippets.

View ZMon3y's full-sized avatar

Matthew Szafir ZMon3y

View GitHub Profile
@ZMon3y
ZMon3y / endOfDayShutdown.sh
Created June 5, 2020 13:31
script to dynamically shut down / pause SQL Pools & VMs w/in a resource group
#!/bin/bash
## Author: Matt Szafir
## Description: This script is inteded to be used to shut down resources at the end of the day to save costs while developing in Azure
# Currently only doing VMs and Synapse SQL Pools
## Requirements: bash >= 4
# az cli version?
# az login already run
## TODO: add logging & perhaps integrate with a morning script
@ZMon3y
ZMon3y / createSynapse.sh
Created May 20, 2020 17:49
bash Script to Create Azure Synapse Analytics Workspace & SQL Pool
#!/bin/bash
#### DEFINE VARIABLES ####
echo "DEFINING VARIABLES"
randomNumber=$((1 + RANDOM % 1000))
resourceGroupName="synapsePOC"
location="eastus2"
synapseStorageAccount="synapsestorageaccount$randomNumber" # synapseStorageAccount###
synapseFileSystem="synapsefilesystem$randomNumber" # synapseFileSystem### This is basically a container
synapseWorkspaceName="synapseworkspace$randomNumber"