176 lines
4.8 KiB
JSON
176 lines
4.8 KiB
JSON
{
|
|
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
|
|
"contentVersion": "1.0.0.0",
|
|
"parameters": {
|
|
"baseName": {
|
|
"defaultValue": "[resourceGroup().name]",
|
|
"type": "String",
|
|
"metadata": {
|
|
"description": "The base resource name."
|
|
}
|
|
},
|
|
"tenantId": {
|
|
"defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47",
|
|
"type": "String",
|
|
"metadata": {
|
|
"description": "The tenant ID to which the application and resources belong."
|
|
}
|
|
},
|
|
"testApplicationId": {
|
|
"type": "String",
|
|
"metadata": {
|
|
"description": "The application client ID used to run tests."
|
|
}
|
|
},
|
|
"testApplicationSecret": {
|
|
"type": "String",
|
|
"metadata": {
|
|
"description": "The application client secret used to run tests."
|
|
}
|
|
},
|
|
"testApplicationOid": {
|
|
"defaultValue": "b3653439-8136-4cd5-aac3-2a9460871ca6",
|
|
"type": "String",
|
|
"metadata": {
|
|
"description": "The client OID to grant access to test resources."
|
|
}
|
|
},
|
|
"location": {
|
|
"defaultValue": "[resourceGroup().location]",
|
|
"type": "String",
|
|
"metadata": {
|
|
"description": "The location of the resource. By default, this is the same as the resource group."
|
|
}
|
|
},
|
|
"enableSoftDelete": {
|
|
"defaultValue": true,
|
|
"type": "Bool",
|
|
"metadata": {
|
|
"description": "Whether to enable soft delete for the Key Vault. The default is true."
|
|
}
|
|
},
|
|
"keyVaultDomainSuffix": {
|
|
"defaultValue": ".vault.azure.net",
|
|
"type": "String",
|
|
"metadata": {
|
|
"description": "Domain suffix for sovereign clouds, requires the preceding '.'. The default uses the public Azure Cloud (.vault.azure.net)"
|
|
}
|
|
},
|
|
"keyVaultSku": {
|
|
"defaultValue": "premium",
|
|
"type": "String",
|
|
"metadata": {
|
|
"description": "Key Vault SKU to deploy. The default is 'premium'"
|
|
}
|
|
}
|
|
},
|
|
"variables": {
|
|
"azureKeyVaultUrl": "[format('https://{0}{1}/', parameters('baseName'), parameters('keyVaultDomainSuffix'))]",
|
|
"networkAcls": {
|
|
"bypass": "AzureServices",
|
|
"defaultAction": "Allow",
|
|
"virtualNetworkRules": [],
|
|
"ipRules": []
|
|
}
|
|
},
|
|
"resources": [
|
|
{
|
|
"type": "Microsoft.KeyVault/vaults",
|
|
"apiVersion": "2021-11-01-preview",
|
|
"name": "[parameters('baseName')]",
|
|
"location": "[parameters('location')]",
|
|
"properties": {
|
|
"sku": {
|
|
"family": "A",
|
|
"name": "[parameters('keyVaultSku')]"
|
|
},
|
|
"tenantId": "[parameters('tenantId')]",
|
|
"accessPolicies": [
|
|
{
|
|
"tenantId": "[parameters('tenantId')]",
|
|
"objectId": "[parameters('testApplicationOid')]",
|
|
"permissions": {
|
|
"keys": [
|
|
"wrapKey",
|
|
"decrypt",
|
|
"list",
|
|
"purge",
|
|
"recover",
|
|
"restore",
|
|
"getrotationpolicy",
|
|
"sign",
|
|
"release",
|
|
"encrypt",
|
|
"rotate",
|
|
"import",
|
|
"create",
|
|
"verify",
|
|
"setrotationpolicy",
|
|
"backup",
|
|
"update",
|
|
"get",
|
|
"unwrapKey",
|
|
"delete"
|
|
],
|
|
"secrets": [
|
|
"Get",
|
|
"List",
|
|
"Set",
|
|
"Delete",
|
|
"Recover",
|
|
"Backup",
|
|
"Restore",
|
|
"Purge"
|
|
],
|
|
"certificates": [
|
|
"Get",
|
|
"List",
|
|
"Update",
|
|
"Create",
|
|
"Import",
|
|
"Delete",
|
|
"Recover",
|
|
"Backup",
|
|
"Restore",
|
|
"ManageContacts",
|
|
"ManageIssuers",
|
|
"GetIssuers",
|
|
"ListIssuers",
|
|
"SetIssuers",
|
|
"DeleteIssuers",
|
|
"Purge"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"enabledForDeployment": false,
|
|
"enabledForDiskEncryption": false,
|
|
"enabledForTemplateDeployment": false,
|
|
"enableSoftDelete": "[parameters('enableSoftDelete')]"
|
|
}
|
|
}
|
|
],
|
|
"outputs": {
|
|
"AZURE_KEYVAULT_URL": {
|
|
"type": "String",
|
|
"value": "[variables('azureKeyVaultUrl')]"
|
|
},
|
|
"AZURE_TENANT_ID": {
|
|
"type": "String",
|
|
"value": "[parameters('tenantId')]"
|
|
},
|
|
"AZURE_CLIENT_ID": {
|
|
"type": "String",
|
|
"value": "[parameters('testApplicationId')]"
|
|
},
|
|
"AZURE_CLIENT_SECRET": {
|
|
"type": "String",
|
|
"value": "[parameters('testApplicationSecret')]"
|
|
},
|
|
"CLIENT_OBJECTID": {
|
|
"type": "String",
|
|
"value": "[parameters('testApplicationOid')]"
|
|
}
|
|
}
|
|
}
|