Azure / Azure/azure-quickstart-templates
'Could not find member 'reference' on object of type 'TemplateInputParameter'.
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
Having issue using KeyVault to fetch secret parameters to my ARM template.
### Snippet
```
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"type": "securestring",
"metadata": {
"description": "User name for the Virtual Machine."
}
},
"adminPassword": {
"reference": {
"keyVault": {
"id": "/subscriptions/{sub_id}/resourceGroups/{groupname}/providers/Microsoft.KeyVault/vaults/{myVault}"
},
"secretName": "password"
},
"type": "securestring",
"metadata": {
"description": "Password for the Virtual Machine."
}
}
[...]
}
```
Invoking the template as follows:
`azure group deployment create -g TestResourceGroup -f simplevm.json -e simplevm.parameters.json -n TestDeployment`
I still get prompted for an `adminPassword`, which instead should be taken from KeyVault (permissions are OK). After I enter I fake password, it fails:
```
info: Executing command group deployment create
info: Supply values for the following parameters
adminPassword: fakepwd
+ Initializing template configurations and parameters
+ Creating a deployment
error: InvalidRequestContent : The request content was invalid and could not be deserialized: 'Could not find member 'reference' on object of type 'TemplateInputParameter'. Path 'properties.template.parameters.adminPassword.reference', line 1, position 293.'.
error: Deployment validate failed.
```
```
$ azure --version
0.10.7 (node: 5.1.0)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the ARM template in simplevm.json and the supplied values in simplevm.parameters.json, then reproduce the failure with `azure group deployment create`. Compare the `adminPassword` parameter shape with the deployment validation error and determine what behavior or documentation should be corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100