We are deploying the Custom Role for Key Vault using ARM template from using the Blueprint. When We try to upload the ARM template to the Blue print and give a Publish & Assign. The deployment fails at-last with the below error message -
Error Message:- 1.Message: Deployment template validation failed: 'The template resource,at line '1' and column '2008' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name."
2.The artifact 'f87238e1-28d5-45fa-8ad9-176d07e79a81' of type 'Template' failed to deploy due to the following error: Template deployment failed with error [ { "code": "LocationRequired", "message": "The location property is required for this definition." } ]
Someone Please can you correct this and what might be wrong.
If you need code please let me know.
Code for reference -
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"variables": {},
"resources": [
{
"type": "Microsoft.KeyVault/vaults",
"apiVersion": "2019-09-01",
"name": "Key Vault resource manager template deployment operator",
"properties": {
"Name": "Reader for KeyVault",
"location": "West US",
"IsCustom": true,
"Description": "Allows only reader access to KeyVault.",
"Actions": [
"Microsoft.KeyVault/vaults/*/read" ],
"NotActions": [],
"DataActions": [],
"NotDataActions": [],
"AssignableScopes": [
"/subscriptions/000000/resourceGroups/RG-SK"
]
}
}
]
}`