# Check that results fileshare does NOT exist or issue warning and wait
exists=$( az storage share exists --account-name${storageAccountResults}--account-key${storageAccountKeyResults}--name"${shareNameResults}"--output tsv )
if[[$exists=="True"&&$FORCE== 0 ]];then
echo" [ERROR] File share \"${shareNameResults}\" in \"${storageAccountResults}\" ALREADY EXISTS!"
echo" To overwrite, use -f option"
if[[$exists=="False"]];then
az storage share create \
--account-name${storageAccountResults}\
--account-key${storageAccountKeyResults}\
--name"${shareNameResults}"\
--quota 3072 \
--output none
else
if[[$FORCE== 0 ]];then
echo" [ERROR] File share \"${shareNameResults}\" in \"${storageAccountResults}\""
echo" ALREADY EXISTS!"
echo" If you don't mind potentially overwriting, use -f option"
exit 2
else
quota=$( az storage share show --account-name${storageAccountResults}--account-key${storageAccountKeyResults}--name"${shareNameResults}"--output json --query properties.quota )
if[[$quota < 3072 ]];then
echo" [WARNING] File share \"${shareNameResults}\" in \"${storageAccountResults}\""
echo" has a quota smaller than 3072G, resizing to 3072..."
az storage share update --account-name${storageAccountResults}--account-key${storageAccountKeyResults}--name"${shareNameResults}"--quota 3072