In case you have not read the article which led to this one, check it out here “How to use ARM templates for deployments”. Once I resolved the previous 2 bumps:
- Deployment template validation failed: Circular dependency detected on resource
- osDisk.managedDisk.id’ is not allowed
The final action was to provide an admin password for my VMs.
Figure1 – failed deployment using an Azure ARM template
When I clicked on the ‘Operations details’ I saw the following output as the cause of the failure.
{
“error”: {
“code”: “InvalidParameter”,
“target”: “adminPassword”,
“message”: “Required parameter ‘adminPassword’ is missing (null).”
}
}
I am not a security expert, but I can see why those who make the security decisions would not include the password to an already created VM via a link within the portal. Therefore, searching through the template I found the following and thought a good place for the adminPassword would be right after the adminUsername and therefore, replaced the following:
“osProfile”: {
“computerName”: “[parameters(‘virtualMachines_HCM001_name’)]”,
“adminUsername”: “HCMAdmin”,
“windowsConfiguration”:
{
“provisionVMAgent”: true,
“enableAutomaticUpdates”: true
},
…
with this:
“osProfile”: {
“computerName”: “[parameters(‘virtualMachines_HCM001_name’)]”,
“adminUsername”: “HCMAdmin”,
“adminPassword”: “P@ssw0rd”,
“windowsConfiguration”: {
“provisionVMAgent”: true,
“enableAutomaticUpdates”: true },
…
And that completed the journey.
Although a little challenging, this is possible and actually quite fulflling to solve the issues and be successful.
To get a overview of the project I worked on, read the following articles as well.
- Required parameter ‘adminPassword’ is missing (null).
- osDisk.managedDisk.id’ is not allowed
- Creating an Azure App Service Hybrid Connection
- How to deploy to Azure using an ARM template with PowerShell
- How to use/create ARM templates for deployments
- Deployment template validation failed: Circular dependency detected on resource
- How to Azure Function App with Hybrid Connection
- Troubleshooting App Service Hybrid Connection Manager