Skip to content

Instantly share code, notes, and snippets.

@johndowns
Last active November 6, 2018 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johndowns/a7bf301c0415a2fc4e9e3513e9cef1dc to your computer and use it in GitHub Desktop.
Save johndowns/a7bf301c0415a2fc4e9e3513e9cef1dc to your computer and use it in GitHub Desktop.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountName": {
"type": "string",
"defaultValue": "[uniqueString(subscription().subscriptionId, resourceGroup().name)]"
},
"containerName": {
"type": "string",
"defaultValue": "images"
}
},
"variables": {
"accountSasFunctionValues": {
"signedServices": "b",
"signedPermission": "l",
"signedResourceTypes": "s",
"signedExpiry": "2050-01-01T00:00:00Z"
}
},
"resources": [
{
"apiVersion": "2018-02-01",
"name": "[parameters('storageAccountName')]",
"location": "[resourceGroup().location]",
"type": "Microsoft.Storage/storageAccounts",
"sku": {
"name": "Standard_LRS"
},
"kind": "StorageV2",
"properties": {
"supportsHttpsTrafficOnly": true,
"accessTier": "Hot",
"encryption": {
"services": {
"blob": {
"enabled": true
},
"file": {
"enabled": true
}
},
"keySource": "Microsoft.Storage"
}
},
"resources": [
{
"name": "[concat('default/', parameters('containerName'))]",
"type": "blobServices/containers",
"apiVersion": "2018-03-01-preview",
"dependsOn": [
"[parameters('storageAccountName')]"
]
}
]
}
],
"outputs": {
"accountSas": {
"type": "string",
"value": "[listAccountSas(parameters('storageAccountName'), '2018-02-01', variables('accountSasFunctionValues')).accountSasToken]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment