{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Locations // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "location": { "type": "string", "defaultValue": "[resourceGroup().location]", "metadata": { "description": "The region where Azure will house the deployment." }, "minLength": 5 }, "vpcResourceGroup": { "type": "string", "defaultValue": "VPC", "metadata": { "description": "Resource Group for Virtual Private Cloud" } }, "jiraBaseUrl": { "type": "string", "defaultValue": "rcetest1.riada.cloud", "metadata": { "description": "An existing CNAME (BaseURL) to use to access the JIRA instance." } }, "sharedHomeSizeInGb": { "type": "string", "defaultValue": "100", "metadata": { "description": "Shared Home File Share Size in GB" } } }, "variables": { "namespace": "[tolower(replace(replace(parameters('jiraBaseUrl'),'.', ''), '-', ''))]", "vault": { "name": "rsv-RiadaCloud", "policy": { "name": "DailyFileShare" }, "backupFabric": "Azure", "protectionType": "AzureFileShareProtectedItem", "protectionContainers": "[array(concat('storagecontainer;storage;', resourceGroup().name, ';', variables('jira').storage.accountName))]", "protectedItems": "[array(concat('azurefileshare;', variables('jira').storage.sharedHomeName))]" }, "jira": { "storage": { "accountName": "[concat('stg', variables('namespace'))]", "sharedHomeName": "[concat(variables('namespace'), '-shared')]" } } }, "resources": [ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Storage // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { "type": "Microsoft.Storage/storageAccounts", "name": "[variables('jira').storage.accountName]", "apiVersion": "2019-06-01", "location": "[parameters('location')]", "sku": { "name": "Standard_LRS", "tier": "Standard" }, "kind": "StorageV2", "properties": { "networkAcls": { "bypass": "AzureServices", "defaultAction": "Deny" } } }, { "type": "Microsoft.Storage/storageAccounts/fileServices/shares", "name": "[concat(variables('jira').storage.accountName, '/default/', variables('jira').storage.sharedHomeName)]", "apiVersion": "2019-06-01", "dependsOn": [ "[variables('jira').storage.accountName]" ], "properties": { "shareQuota": "[parameters('sharedHomeSizeInGb')]" } }, { "apiVersion": "2017-05-10", "name": "nestedTemplateRecoveryServices", "type": "Microsoft.Resources/deployments", "resourceGroup": "[parameters('vpcResourceGroup')]", "dependsOn": [ "[resourceId('Microsoft.Storage/storageAccounts', variables('jira').storage.accountName)]" ], "properties": { "mode": "Incremental", "template": { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": {}, "variables": {}, "resources": [ { "type": "Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems", "apiVersion": "2016-06-01", "name": "[concat(variables('vault').name, '/', variables('vault').backupFabric, '/',variables('vault').protectionContainers[copyIndex()], '/', variables('vault').protectedItems[copyIndex()])]", "location": "[resourceGroup().location]", "properties": { "backupManagementType": "AzureStorage", "workloadType": "AzureFileShare", "friendlyName": "afs", "protectedItemType": "AzureFileShareProtectedItem", "policyId": "[resourceId('Microsoft.RecoveryServices/vaults/backupPolicies', variables('vault').name, variables('vault').policy.name)]", "sourceResourceId": "[resourceId('Microsoft.Storage/storageAccounts', variables('jira').storage.accountName)]" }, "copy": { "name": "protectedItemsCopy", "count": "[length(variables('vault').protectedItems)]" } } ] }, "parameters": {}, "outputs": {} } } ], "outputs": { } }