Skip to content

Commit e32a4e7

Browse files
msmbaldwinCopilot
andauthored
Restore azuredeploy.json for key-vault-key-create (#14739)
Re-adds azuredeploy.json (compiled from main.bicep) which was incorrectly removed during the recent RBAC modernization PR. The 'Deploy to Azure' button in README.md links to this file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 047e57a commit e32a4e7

1 file changed

Lines changed: 145 additions & 0 deletions

File tree

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
{
2+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
3+
"contentVersion": "1.0.0.0",
4+
"metadata": {
5+
"_generator": {
6+
"name": "bicep",
7+
"version": "0.42.1.51946",
8+
"templateHash": "4335991112049834035"
9+
}
10+
},
11+
"parameters": {
12+
"vaultName": {
13+
"type": "string",
14+
"metadata": {
15+
"description": "The name of the key vault to be created."
16+
}
17+
},
18+
"keyName": {
19+
"type": "string",
20+
"metadata": {
21+
"description": "The name of the key to be created."
22+
}
23+
},
24+
"location": {
25+
"type": "string",
26+
"defaultValue": "[resourceGroup().location]",
27+
"metadata": {
28+
"description": "The location of the resources."
29+
}
30+
},
31+
"skuName": {
32+
"type": "string",
33+
"defaultValue": "standard",
34+
"allowedValues": [
35+
"standard",
36+
"premium"
37+
],
38+
"metadata": {
39+
"description": "The SKU of the vault to be created."
40+
}
41+
},
42+
"keyType": {
43+
"type": "string",
44+
"defaultValue": "RSA",
45+
"allowedValues": [
46+
"EC",
47+
"EC-HSM",
48+
"RSA",
49+
"RSA-HSM"
50+
],
51+
"metadata": {
52+
"description": "The JsonWebKeyType of the key to be created."
53+
}
54+
},
55+
"keyOps": {
56+
"type": "array",
57+
"defaultValue": [],
58+
"metadata": {
59+
"description": "The permitted JSON web key operations of the key to be created."
60+
}
61+
},
62+
"keySize": {
63+
"type": "int",
64+
"defaultValue": 2048,
65+
"metadata": {
66+
"description": "The size in bits of the key to be created."
67+
}
68+
},
69+
"curveName": {
70+
"type": "string",
71+
"defaultValue": "",
72+
"allowedValues": [
73+
"",
74+
"P-256",
75+
"P-256K",
76+
"P-384",
77+
"P-521"
78+
],
79+
"metadata": {
80+
"description": "The JsonWebKeyCurveName of the key to be created."
81+
}
82+
}
83+
},
84+
"resources": [
85+
{
86+
"type": "Microsoft.KeyVault/vaults",
87+
"apiVersion": "2023-07-01",
88+
"name": "[parameters('vaultName')]",
89+
"location": "[parameters('location')]",
90+
"properties": {
91+
"enableRbacAuthorization": true,
92+
"enableSoftDelete": true,
93+
"softDeleteRetentionInDays": 90,
94+
"enabledForDeployment": false,
95+
"enabledForDiskEncryption": false,
96+
"enabledForTemplateDeployment": false,
97+
"tenantId": "[subscription().tenantId]",
98+
"sku": {
99+
"name": "[parameters('skuName')]",
100+
"family": "A"
101+
},
102+
"networkAcls": {
103+
"defaultAction": "Allow",
104+
"bypass": "AzureServices"
105+
}
106+
}
107+
},
108+
{
109+
"type": "Microsoft.KeyVault/vaults/keys",
110+
"apiVersion": "2023-07-01",
111+
"name": "[format('{0}/{1}', parameters('vaultName'), parameters('keyName'))]",
112+
"properties": {
113+
"kty": "[parameters('keyType')]",
114+
"keyOps": "[parameters('keyOps')]",
115+
"keySize": "[parameters('keySize')]",
116+
"curveName": "[parameters('curveName')]"
117+
},
118+
"dependsOn": [
119+
"[resourceId('Microsoft.KeyVault/vaults', parameters('vaultName'))]"
120+
]
121+
}
122+
],
123+
"outputs": {
124+
"proxyKey": {
125+
"type": "object",
126+
"value": "[reference(resourceId('Microsoft.KeyVault/vaults/keys', parameters('vaultName'), parameters('keyName')), '2023-07-01')]"
127+
},
128+
"location": {
129+
"type": "string",
130+
"value": "[parameters('location')]"
131+
},
132+
"name": {
133+
"type": "string",
134+
"value": "[parameters('vaultName')]"
135+
},
136+
"resourceGroupName": {
137+
"type": "string",
138+
"value": "[resourceGroup().name]"
139+
},
140+
"resourceId": {
141+
"type": "string",
142+
"value": "[resourceId('Microsoft.KeyVault/vaults', parameters('vaultName'))]"
143+
}
144+
}
145+
}

0 commit comments

Comments
 (0)