Azure / arm-ttk

Azure Resource Manager Template Toolkit
https://aka.ms/arm-ttk
MIT License
437 stars 184 forks source link

The arm-ttk installs successfully, but is invisible #729

Open brentarias opened 1 year ago

brentarias commented 1 year ago

On Windows 11, I opened PowerShell Core (v7.3) and have executed the following command:

PS C:\Users\BArias\Downloads\arm-template-toolkit\arm-ttk> Import-Module .\arm-ttk.psd1
A newer version of the ARM-TTK is available at: https://github.com/Azure/arm-ttk/releases
Installed Version: 0.21
Latest Version: 0.22

Unfortunately, I am unable to confirm that any module had been installed. With Get-Module I don't know what name to search for, but any combination of "arm" or "ttk" returns nothing. Furthermore, the Test-AzTemplate cmdlet it was supposed to provide is AWOL. If I type in Test-AzTemplate I get the following:

PowerShell 7.3.2
PS C:\Users\BArias> Test-AzTemplate
Test-AzTemplate: The term 'Test-AzTemplate' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
PS C:\Users\BArias>

I then try this...

PS C:\repos> Get-Command Test-AzTemplate -All
Get-Command: The term 'Test-AzTemplate' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I have also attempted to access the Test-AzTemplate command directly, like this:

PS C:\repos\marketplace\arm-new> C:\Users\BArias\Downloads\arm-template-toolkit\arm-ttk\Test-AzTemplate.ps1 -TemplatePath mainTemplate.json
PS C:\repos\marketplace\arm-new>

The result is that it does absolutely nothing. No errors, no processing. My PS prompt is given back, indicating nothing happened.

Why does arm-ttk act as though it is a ghost? It is as if it simply isn't there.

I have then made the effort to work with a Windows 10 laptop. I got exactly the same results. I asked a friend to attempt the same installation...but it worked for him. We started looking for differences between his configuration and mine, and the only difference we noted...is that he did not have the Azure CLI installed.

Perhaps the arm-ttk module is not compatible with the Azure CLI?

vidapour commented 7 months ago

The Azure Apps team uses the TTK with CLI, so it doesn't seem like that would be the issue.

Can you try re-running step 5 in this guidance and see if that works? https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/test-toolkit#install-on-windows

Thanks!