Azure / arm-ttk

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

Group-Object InnerTemplateName is failing with error Index (zero based) must be greater than or equal to zero and less than the size of the argument list #759

Open xpillons opened 10 months ago

xpillons commented 10 months ago

Using arm-ttk version 0.24 downloaded from this repo I'm getting the following error with a complex ARM template generated from bicep files.

How to troubleshoot this ? the deployment is successful, just the validation is failing.


    [+] Min And Max Value Are Numbers (74 ms)
   NestedTemplate azhop [ Lines 141 - 335 ]
    [?] Outputs Must Not Contain Secrets (92 ms) 
Warning:         Resulting JSON is truncated as serialization has exceeded the set depth of 2.

  Parameter Types Should Be Consistent
    [+] Parameter Types Should Be Consistent (506 ms)
  Parameters Must Be Referenced
    [+] Parameters Must Be Referenced (528 ms)
Group-Object: /__w/az-hop/az-hop/marketplace/solution/arm-ttk/arm-ttk/Test-AzTemplate.ps1:340
Line |
 340 |                          Group-Object InnerTemplateName |
     |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Password params must be secure
    [+] Password params must be secure (95 ms) 
Warning:         Skipping parameter "secret_permissions"
Warning:         Skipping parameter "secret_permissions"

     | Index (zero based) must be greater than or equal to zero and less than
     | the size of the argument list.
vidapour commented 10 months ago

@xpillons can you provide us with your full template so that we can troubleshoot. Thanks!

xpillons commented 10 months ago

please find attached mainTemplate.json

xpillons commented 10 months ago

@vidapour any news on this ? this is blocking us to publish a new version in the partner portal

vidapour commented 10 months ago

Few questions to start off:

It's likely that one of the above may not be up to date. I think you can submit your offer as-is; we tested the template you sent and didn't see any failures.

xpillons commented 10 months ago

@vidapour I'm not using PS directly being fully on WSL2 an Ubuntu 22.04, and yes I'm on the latest of TTK. I noticed that this is now working both on my laptop and in my gihub pipeline, so I guess something have been upgraded. So this can be closed now. Thank you