-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy_storage.sh
More file actions
30 lines (26 loc) · 855 Bytes
/
deploy_storage.sh
File metadata and controls
30 lines (26 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
storageAccountName="<storage-account-name>"
resourceGroupName="<resource-group-name>"
location="<location>"
sasExpirationDate="<YYYY-MM-DD>"
echo "Creating storage account..."
az storage account create \
--name $storageAccountName \
--resource-group $resourceGroupName \
--location $location \
--sku Standard_RAGRS \
--kind StorageV2
echo "Creating blob container..."
az storage container create \
--name orders \
--account-name $storageAccountName \
--auth-mode login
echo "Generating SAS..."
az storage account generate-sas \
--account-name $storageAccountName \
--expiry $sasExpirationDate \
--https-only \
--permissions rwdlacup \
--resource-types sco \
--services bfqt
echo "Getting storage account access keys..."
az storage account keys list --account-name $storageAccountName