-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeyVault.template.json
57 lines (57 loc) · 1.65 KB
/
keyVault.template.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"config": {
"type": "secureObject"
}
},
"variables": {
"tenantId": "[parameters('config').servicePrincipalTenant]",
"keyVaultName": "[parameters('config').vaultName]",
"defaultLocation": "[resourceGroup().location]",
"secretName": "[parameters('config').secret.name]",
"secretValue": "[parameters('config').secret.value]",
"accessPolicies" : "[parameters('config').accessPolicies]"
},
"resources": [
{
"type": "Microsoft.KeyVault/vaults",
"name": "[variables('keyVaultName')]",
"apiVersion": "2015-06-01",
"location": "[variables('defaultLocation')]",
"tags": {
"displayName": "KeyVault"
},
"properties": {
"enabledForDeployment": true,
"enabledForTemplateDeployment": true,
"tenantId": "[variables('tenantId')]",
"sku": {
"name": "standard",
"family": "A"
},
"accessPolicies": "[variables('accessPolicies')]"
},
"resources": [
{
"type": "secrets",
"name": "[variables('secretName')]",
"apiVersion": "2015-06-01",
"properties": {
"value": "[variables('secretValue')]"
},
"dependsOn": [
"[concat('Microsoft.KeyVault/vaults/', variables('keyVaultName'))]"
]
}
]
}
],
"outputs": {
"KeyVaultUri": {
"type": "string",
"value": "[reference(resourceId('Microsoft.KeyVault/vaults/', variables('keyVaultName'))).VaultUri]"
}
}
}