Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
166 lines (166 sloc) 6.09 KB
{
"parameters": {
"siteName": {
"type": "string"
},
"hostingPlanName": {
"type": "string"
},
"mySecretValue": {
"type": "securestring"
},
"nestedSecretValue": {
"type": "securestring"
},
"repoUrl": {
"type": "string"
},
"branch": {
"type": "string"
}
},
"variables": {
"vaultName": "[concat('msi-vault-', uniqueString(parameters('siteName')))]"
},
"resources": [
{
"name": "[parameters('siteName')]",
"type": "Microsoft.Web/sites",
"dependsOn": [
"[concat('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"[resourceId('microsoft.insights/components/', parameters('sitename'))]"
],
"identity": {
"type": "SystemAssigned"
},
"properties": {
"siteConfig": {
"appSettings": [
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(resourceId('microsoft.insights/components/', parameters('siteName')), '2015-05-01').InstrumentationKey]"
},
{
"name": "KEYVAULT_ENDPOINT",
"value": "[concat('https://', variables('vaultName'), '.vault.azure.net/')]"
}
]
},
"name": "[parameters('siteName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]",
"hostingEnvironment": ""
},
"resources": [
{
"apiVersion": "2014-04-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', parameters('siteName'))]"
],
"properties": {
"RepoUrl": "[parameters('repoUrl')]",
"branch": "[parameters('branch')]",
"IsManualIntegration": true
}
}
],
"apiVersion": "2016-03-01",
"location": "[resourceGroup().location]",
"tags": {
"[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms/', parameters('hostingPlanName')))]": "empty"
}
},
{
"apiVersion": "2016-09-01",
"name": "[parameters('hostingPlanName')]",
"type": "Microsoft.Web/serverfarms",
"location": "[resourceGroup().location]",
"properties": {
"name": "[parameters('hostingPlanName')]",
"workerSizeId": "0",
"reserved": false,
"numberOfWorkers": "1",
"hostingEnvironment": ""
},
"sku": {
"Tier": "Free",
"Name": "F1"
}
},
{
"apiVersion": "2015-05-01",
"name": "[parameters('siteName')]",
"type": "microsoft.insights/components",
"location": "South Central US",
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', parameters('siteName'))]": "Resource"
},
"properties": {
"ApplicationId": "[parameters('siteName')]",
"Request_Source": "IbizaWebAppExtensionCreate"
}
},
{
"apiVersion": "2015-06-01",
"name": "[variables('vaultName')]",
"dependsOn": [
"[concat('Microsoft.Web/sites/', parameters('siteName'))]"
],
"location": "[resourceGroup().location]",
"type": "Microsoft.KeyVault/vaults",
"properties": {
"enabledForDeployment": false,
"enabledForTemplateDeployment": false,
"enabledForDiskEncryption": false,
"accessPolicies": [{
"objectId": "[reference(concat(resourceId('Microsoft.Web/sites', parameters('siteName')), '/providers/Microsoft.ManagedIdentity/Identities/default'), '2015-08-31-PREVIEW').principalId]",
"tenantId": "[subscription().tenantId]",
"permissions": {
"secrets": [
"Get",
"List"
]
}
}],
"tenantId": "[subscription().tenantId]",
"sku": {
"name": "Standard",
"family": "A"
}
}
},
{
"type": "Microsoft.KeyVault/vaults/secrets",
"name": "[concat(variables('vaultName'), '/MySecret')]",
"apiVersion": "2015-06-01",
"properties": {
"contentType": "text/plain",
"value": "[parameters('mySecretValue')]"
},
"dependsOn": [
"[resourceId('Microsoft.KeyVault/vaults', variables('vaultName'))]"
]
},
{
"type": "Microsoft.KeyVault/vaults/secrets",
"name": "[concat(variables('vaultName'), '/Secrets--NestedSecret')]",
"apiVersion": "2015-06-01",
"properties": {
"contentType": "text/plain",
"value": "[parameters('nestedSecretValue')]"
},
"dependsOn": [
"[resourceId('Microsoft.KeyVault/vaults', variables('vaultName'))]"
]
}
],
"outputs": {
"foo": {
"type": "object",
"value": "[reference(resourceId('Microsoft.KeyVault/vaults', variables('vaultName')))]"
}
},
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0"
}