Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Jan 4, 2024 · 5 comments

Comments

@xpillons
Copy link

xpillons commented Jan 4, 2024

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
Copy link

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

@xpillons
Copy link
Author

please find attached
mainTemplate.json

@xpillons
Copy link
Author

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

@vidapour
Copy link

Few questions to start off:

  • what version of Powershell are you using? is it 6+?
  • are you using the latest version of the TTK? ARM TTK

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
Copy link
Author

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants