Azure / Azure/azure-cli

az ts show Doesn't Report Spec Versions

Open
#16,801 4 comments 0 reactions 1 assignee Claimed by @zhoxing-ms View on GitHub
act-identity-squad ARM Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

## Describe the bug
When using the `az ts show` command, the property named versions is "null", even when there are versions (which is a required property on a template spec).

**Command Name**
`az ts show --name --resource-group `
`az ts show --name --resource-group --query versions`

**Errors:**
No error is returned, but the value of the `versions` property in the output of the above command is `null`.

## To Reproduce:
I was testing this using the Azure Cloud Shell, but I get the same result when running Az CLI 2.18.0 on Windows. Using Az CLI 2.18.0 in either cloud shell or on windows should be able to reproduce this behaviour.

- `az ts show --name {} --resource-group {}`

## Expected Behavior
I would expect to see all versions of the template spec, similar to the `Versions` property when running the PowerShell cmdlet `Get-AzTemplateSpec`.

```
Id : /subscriptions/7ecbc33f-d50e-4339-a26b-eb307001d280/resourceGroups/rg-templatespecs/providers/M
icrosoft.Resources/templateSpecs/vnet-two-subnets
Name : vnet-two-subnets
ResourceGroupName : rg-templatespecs
SubscriptionId : 7ecbc33f-d50e-4339-a26b-eb307001d280
Location : eastus
Description : Deploy a VNET with two subnets
Versions : {1.0, 1.1}
CreationTime(UTC) : 1/02/2021 6:45:58 PM
LastModifiedTime(UTC) : 1/02/2021 6:49:27 PM
```

## Environment Summary
```
Linux-4.15.0-1106-azure-x86_64-with-debian-10.2 (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.18.0
azure-cli-ml 1.20.0

Extensions:
ai-examples 0.2.5
azure-cli-ml 1.20.0

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.