Azure / Azure/azure-quickstart-templates
The template resource '[concat(parameters('Vault_name'), '/', parameters('secretsObject').secrets[copyInd ex()].secretName)]' at line '73' and column '9' is not valid: The language expression property 'secrets' doesn't exist, available properties are 'CliXml'
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
201-key-vault-secret-create [(https://github.com/Azure/azure-quickstart-templates/tree/master/201-key-vault-secret-create)
Below is my Parameters.Json file:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"Vault_name":"KVCheck",
"secretsObject": {
"value": {
"secrets": [
{
"secretName": "Test1",
"secretValue": "Sample Value"
},
{
"secretName": "Test2",
"secretValue": "Sample Value"
}
]
}
}
}
}
and here is my Template :
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"Vault_name": {
"defaultValue": "APIMSPOConnectorKeyVault",
"type": "string"
}
"secretsObject": {
"type": "secureObject",
"metadata": {
"description": "Specifies all secrets {\"secretName\":\"\",\"secretValue\":\"\"} wrapped in a secure object."
}
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.KeyVault/vaults",
"apiVersion": "2016-10-01",
"name": "[parameters('Vault_name')]",
"location": "[resourceGroup().location]",
"properties": {
"sku": {
"family": "A",
"name": "Standard"
},
"tenantId": "[subscription().tenantId]",
"accessPolicies": [
],
"enabledForDeployment": true,
"enabledForDiskEncryption": false,
"enabledForTemplateDeployment": true,
"enableSoftDelete": true
}
},
{
"type": "Microsoft.KeyVault/vaults/secrets",
"name": "[concat(parameters('Vault_name'), '/', parameters('secretsObject').secrets[copyIndex()].secretName)]",
"apiVersion": "2018-02-14",
"dependsOn": [
"[concat('Microsoft.KeyVault/vaults/', parameters('Vault_name'))]"
],
"copy": {
"name": "secretsCopy",
"count": "[length(parameters('secretsObject').secrets)]"
},
"properties": {
"value": "[parameters('secretsObject').secrets[copyIndex()].secretValue]"
}
}
]
}
and its not able to recognize the object.
Contributor guide
No contributing guide indexed for this repository
Research direction
Open the linked 201-key-vault-secret-create template and inspect the secretsObject parameter and the Microsoft.KeyVault/vaults/secrets resource at line 73. Reproduce the deployment with the supplied Parameters.Json; done means the template validates and deploys the listed Test1 and Test2 secrets without the reported property error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100