--source image:tag@sha256 is not accepted by az acr import
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62
**Describe the bug**
When --source parameter feed to az acr import in format image:tag@sha256, result of command complained invalid value. However if --source parameter comes with either image:tag or image@sha256, then az acr import run successfully.
**To Reproduce**
- command **az acr import image:tag@sha256** failed because of invalid value
```
az acr import --name xxx --source k8s.gcr.io/ingress-nginx/controller:v0.41.0@sha256:e6019e536cfb921afb99408d5292fa88b017c49dd29d05fc8dbc456aa770d590 -g xxx --subscription xxx
BadRequestError: Invalid value ingress-nginx/controller:v0.41.0@sha256:e6019e536cfb921afb99408d5292fa88b017c49dd29d05fc8dbc456aa770d590 for property parameters.Source.SourceImage for resource name viennaacrexport. Kindly refer to the docs: https://aka.ms/acr/import
```
- command **az acr import --source image:tag** works
`az acr import --name xxx --source k8s.gcr.io/ingress-nginx/controller:v0.41.0 -g xxx --subscription xxx`
- command **az acr import --source image@sha256** works
`az acr import --name xxx --source k8s.gcr.io/ingress-nginx/controller@sha256:e6019e536cfb921afb99408d5292fa88b017c49dd29d05fc8dbc456aa770d590 -g xxx --subscription xxx`
**Expected behavior**
**Environment summary**
WSL 2.0 running on Windows 10
```
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
```
```
az --version
azure-cli 2.14.1 *
core 2.14.1 *
telemetry 1.0.6
Python location '/home/evan/bin/python3'
Extensions directory '/home/evan/.azure/cliextensions'
Python (Linux) 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0]
Legal docs and information: aka.ms/AzureCliLegal
You have 2 updates available. Consider updating your CLI installation with 'az upgrade'
Please let us know how we are doing: https://aka.ms/azureclihats
and let us know if you're interested in trying out our newest features: https://aka.ms/CLIUXstudy
```
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.