Azure / deployment-stacks

Contains Deployment Stacks CLI scripts and releases
MIT License
87 stars 6 forks source link

Running az stack sub create throws error #98

Closed tomaustin700 closed 1 year ago

tomaustin700 commented 1 year ago

Describe the bug Hi, I am following the tutorial (https://github.com/Azure/deployment-stacks/blob/main/TUTORIAL.md) and I'm getting an exception when running az stack sub create --name mySubStack --location uksouth --template-file main.bicep. The error I am getting is:

The command failed with an unexpected error. Here is the traceback:
run_bicep_command() missing 1 required positional argument: 'args'
Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/resource/custom.py", line 2162, in create_deployment_stack_at_subscription
TypeError: run_bicep_command() missing 1 required positional argument: 'args'

To Reproduce Steps to reproduce the behavior:

  1. Follow steps in readme for deployment stacks Azure CLI install on Windows
  2. Create the bicep files as instructed in the tutorial
  3. Attempt to run az stack sub create --name mySubStack --location uksouth --template-file main.bicep

Expected behavior No exception and resources are created

Repro Environment Host OS: Windows 11 21H2 Powershell Version:

Name                           Value
----                           -----
PSVersion                      7.3.3
PSEdition                      Core
GitCommitId                    7.3.3
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
harshpatel17 commented 1 year ago

Hi Tom, thank you for opening up this issue. I'll spend some time trying to debug this error and will get back to you within a couple of days, thanks again.

harshpatel17 commented 1 year ago

I was able to resolve the issue with the bicep files. This fix should be out when we push out the newest build.