Skip to content

marlonsingleton/simple-Azure-linuxVM-bug-free

Repository files navigation

Inspired by a and my journey to a solution.

At this time of this writing, I submitted a PR to fix the issue presented below.
Confusingly, my PRs were rejected, even with the supporting evidence I provided below.
I'm leaving my work here for others to review and come to thier own conclusions.

The Reported Bug

When launching the ARM deployment directly in the Azure Portal, you're unable to provide an ssh key.

Okay. I figured I'd take a look into this and possibly learn something along the way.

1st Finding

Looking behind the scenes, I found both auth types being assigned the sshKey.
Desirable? Of course not!

2nd Finding

When setting the ARM Template default to password authentication, I got the following error.

By now, I'm feeling this can be fixed by using a condition to prevent the simultaneous auth assignments and converting the parameter value to a valid password when selected.

Here's my suggested fix action

"adminPassword": "[if(equals(parameters('authenticationType'), 'sshPublicKey'), json('null'), base64(parameters('adminPasswordOrKey')))]",

Bug Deployment

Bug Free Deployment

About

PR Request for ARM Template Bug Fix

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published