@Anonymous Thanks for reaching out. As per your ARM template that you have shared you are creating the resource of type Microsoft.Web/connections
and for this (connection resource type) you are defining the properties and inside the properties you are defining the api connection details as azure keyvalut resource in your below ARM template. The below ARM template will only create the API connection i.e. Microsoft.Web/connections resource on your azure subscription and not the keyvalut resource.
To create the keyvalut vaults resource you need to create the resource of type Microsoft.KeyVault/vaults
and you can refer to key Vault document for more details.
Fore Microsoft.Web/connections please refer to this documentation.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"connections_keyvault_name": {
"defaultValue": "keyvault",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Web/connections",
"apiVersion": "2016-06-01",
"name": "[parameters('connections_keyvault_name')]",
"location": "westus2",
"kind": "V1",
"properties": {
"displayName": "kechaw@microsoft.com",
"statuses": [
{
"status": "Error",
"target": "token",
"error": {}
}
],
"customParameterValues": {},
"nonSecretParameterValues": {
"vaultName": "chepra",
"token:TenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47",
"token:grantType": "code"
},
"createdTime": "2020-02-07T06:52:22.7297504Z",
"changedTime": "2021-04-09T16:02:11.7387664Z",
"api": {
"name": "[parameters('connections_keyvault_name')]",
"displayName": "Azure Key Vault",
"description": "Azure Key Vault is a service to securely store and access secrets.",
"iconUri": "[concat('https://connectoricons-prod.azureedge.net/releases/v1.0.1613/1.0.1613.3125/', parameters('connections_keyvault_name'), '/icon.png')]",
"brandColor": "#0079d6",
"id": "[concat('/subscriptions/b83c1ed3-c5b6-44fb-b5ba-2b83a074c23f/providers/Microsoft.Web/locations/westus2/managedApis/', parameters('connections_keyvault_name'))]",
"type": "Microsoft.Web/locations/managedApis"
},
"testLinks": []
}
}
]
}
When you mention "i am unable to create a keyvault with same name as it throws error as KeyVault name already exit" then can you please confirm how you were creating the key valut resource. Were you trying to deploy the same ARM template that you have shared? As the shared ARM template creates the web connection resource and not key vault resource. As there would be already another connection with the same name in your subscription.