Skip to content

Commit 22e485f

Browse files
author
AbhishekMallick01
committed
SFI ROPC - Addressed ConnectionString flagged
1 parent 0493fac commit 22e485f

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

articles/backup/tutorial-restore-disk.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -277,23 +277,12 @@ So, the template name from the above example will be ```azuredeploy1fc2d55d-f0dc
277277
Now get the SAS token for this container and template as detailed [here](../azure-resource-manager/templates/secure-template-with-sas-token.md?tabs=azure-cli#provide-sas-token-during-deployment)
278278

279279
```azurecli-interactive
280-
expiretime=$(date -u -d '30 minutes' +%Y-%m-%dT%H:%MZ)
281-
connection=$(az storage account show-connection-string \
282-
--resource-group mystorageaccountRG \
283-
--name mystorageaccount \
284-
--query connectionString)
285-
token=$(az storage blob generate-sas \
286-
--container-name myVM-daa1931199fd4a22ae601f46d8812276 \
287-
--name azuredeploy1fc2d55d-f0dc-4ca6-ad48-aca0519c0232.json \
288-
--expiry $expiretime \
289-
--permissions r \
290-
--output tsv \
291-
--connection-string $connection)
292-
url=$(az storage blob url \
293-
--container-name myVM-daa1931199fd4a22ae601f46d8812276 \
294-
--name azuredeploy1fc2d55d-f0dc-4ca6-ad48-aca0519c0232.json \
295-
--output tsv \
296-
--connection-string $connection)
280+
$expiryDate=$(date -u -d '30 minutes' +%Y-%m-%dT%H:%MZ)
281+
$sasToken=$(az storage blob generate-sas --account-name
282+
$storageAccountName --container-name
283+
$containerName --name
284+
$templateName --permissions r --expiry
285+
$expiryDate --auth-mode login --as-user --https-only --output tsv)
297286
```
298287

299288
### Deploy the template to create the VM

0 commit comments

Comments
 (0)