Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
188 lines (188 sloc) 5.86 KB
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string",
"metadata": {
"description": "Name of the Storage Account."
}
},
"locationCode": {
"type": "string",
"metadata": {
"description": "Location code where the resource is provisioned."
}
},
"skuName": {
"type": "string",
"metadata": {
"description": "SKU Name of the Storage Account."
},
"allowedValues": [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
"Standard_RGRS"
],
"defaultValue": "Standard_LRS"
},
"skuTier": {
"type": "string",
"metadata": {
"description": "SKU family of the Storage Account."
},
"defaultValue": "Standard"
},
"blobServiceName": {
"type": "string",
"metadata": {
"description": "Name of the blob service."
},
"defaultValue": "default"
},
"blobContainer": {
"type": "string",
"metadata": {
"description": "Name of the blob containers."
},
"defaultValue": "backups"
},
"locationLookup": {
"type": "object",
"metadata": {
"description": "The reference to lookup location - DO NOT TOUCH"
},
"defaultValue": {
"auc": "australiacentral",
"aue": "australiaeast",
"ause": "australiasoutheast",
"jpe": "japaneast",
"jpw": "japanwest",
"krc": "koreacentral",
"krs": "koreasouth",
"ea": "eastasia",
"sea": "southeastasia"
}
},
"author": {
"type": "string",
"metadata": {
"description": "Author in tags"
},
"defaultValue": "Justin Yoo"
},
"profile": {
"type": "string",
"metadata": {
"description": "Profile in tags"
},
"defaultValue": "https://twitter.com/justinchronicle"
},
"projectUrl": {
"type": "string",
"metadata": {
"description": "Project URL in tags"
},
"defaultValue": "https://github.com/devkimchi/Key-Vault-Backup-Restore-Sample"
},
"repositoryUrl": {
"type": "string",
"metadata": {
"description": "Repository URL in tags"
},
"defaultValue": "https://github.com/devkimchi/Key-Vault-Backup-Restore-Sample"
},
"license": {
"type": "string",
"metadata": {
"description": "License in tags"
},
"defaultValue": "https://raw.githubusercontent.com/devkimchi/Key-Vault-Backup-Restore-Sample/master/LICENSE"
}
},
"variables": {
"location": "[if(contains(parameters('locationLookup'), parameters('locationCode')), parameters('locationLookup')[parameters('locationCode')], resourceGroup().location)]",
"storageAccount": {
"name": "[parameters('name')]",
"apiVersion": "[providers('Microsoft.Storage', 'storageAccounts').apiVersions[0]]",
"resourceId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('name'))]",
"location": "[variables('location')]",
"sku": {
"name": "[parameters('skuName')]",
"tier": "[parameters('skuTier')]"
},
"blob": {
"name": "[concat(parameters('name'), '/', parameters('blobServiceName'))]",
"apiVersion": "[providers('Microsoft.Storage', 'storageAccounts/blobServices').apiVersions[0]]",
"resourceId": "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('name'), parameters('blobServiceName'))]",
"container": {
"name": "[parameters('blobContainer')]"
}
}
},
"tags": {
"author": "[parameters('author')]",
"profile": "[parameters('profile')]",
"projectUrl": "[parameters('projectUrl')]",
"repositoryUrl": "[parameters('repositoryUrl')]",
"license": "[parameters('license')]"
}
},
"resources": [
{
"comments": "### RESOURCE - STORAGE ACCOUNT ###",
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "[variables('storageAccount').apiVersion]",
"name": "[variables('storageAccount').name]",
"location": "[variables('storageAccount').location]",
"kind": "StorageV2",
"tags": "[variables('tags')]",
"sku": {
"name": "[variables('storageAccount').sku.name]",
"tier": "[variables('storageAccount').sku.tier]"
},
"properties": {
"supportsHttpsTrafficOnly": true,
"encryption": {
"keySource": "Microsoft.Storage",
"services": {
"blob": {
"enabled": true
},
"file": {
"enabled": true
}
}
}
}
},
{
"comments": "### RESOURCE - STORAGE ACCOUNT - BLOB SERVICE ###",
"apiVersion": "[variables('storageAccount').blob.apiVersion]",
"type": "Microsoft.Storage/storageAccounts/blobServices",
"name": "[variables('storageAccount').blob.name]",
"dependsOn": [
"[variables('storageAccount').resourceId]"
],
"properties": {
"cors": {
"corsRules": [],
"deleteRetentionPolicy": {
"enabled": false
}
}
}
},
{
"comments": "### RESOURCE - STORAGE ACCOUNT - BLOB SERVICE - BLOB CONTAINER ###",
"apiVersion": "[variables('storageAccount').blob.apiVersion]",
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"name": "[concat(variables('storageAccount').blob.name, '/', variables('storageAccount').blob.container.name)]",
"dependsOn": [
"[variables('storageAccount').blob.resourceId]"
]
}
],
"outputs": {}
}
You can’t perform that action at this time.