How can we improve Azure Cloud Shell?

errors on azure shell while trying to create resource group in sandbox

The command is failing and not getting executed . I am getting the below error even when I run the exact command as provided

@Azure:~$ az acr create --resource-group cc95b2a3-a0c1-4891-ad1d-fb5101048c3b --name $ACR_NAME --sku Premium
The command failed with an unexpected error. Here is the traceback:

Parameter 'registry_name' must conform to the following pattern: '^[a-zA-Z0-9]*$'.
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 523, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 581, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 574, in _run_job
six.reraise(*sys.exc_info())
File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
raise value
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 551, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 289, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 453, in default_command_handler
return op(**command_args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/acr/custom.py", line 104, in acr_create
return client.create(resource_group_name, registry_name, registry)
File "/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py", line 351, in create
**operation_config
File "/opt/az/lib/python3.6/site-packages/azure/mgmt/containerregistry/v2018_09_01/operations/registries_operations.py", line 276, in _create_initial
'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$')
File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 592, in url
data = self.validate(data, name, required=True, **kwargs)
File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 672, in validate
raise ValidationError(key, name, value)
msrest.exceptions.ValidationError: Parameter 'registry_name' must conform to the following pattern: '^[a-zA-Z0-9]*$'.

To open an issue, please run: 'az feedback'

2 votes
Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)

We’ll send you updates on this idea

Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
Submitting...
  • edwin young commented  ·   ·  Flag as inappropriate

    What is the value of the $ACR_NAME variable? Likely it is not set or doesn't match the regular expression in the error message

Feedback and Knowledge Base