Azure / Azure/azure-cli-extensions

Unable to create subscription using Terraform with SP that has billing delegation role nor with az-cli

Open
#4,488 1 comment 0 reactions 1 assignee Claimed by @jiasli View on GitHub
Account Auto-Assign customer-reported feature-request
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az account alias create
Extension Name: account. Version: 0.2.2.`

**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
No module named 'azure.core.rest'
Traceback (most recent call last):
File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 657, in execute
raise ex
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 720, 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 691, in _run_job
result = cmd_copy(params)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 112, in handler
client = self.client_factory(self.cli_ctx, command_args) if self.client_factory else None
File "/home/nusrath/.azure/cliextensions/account/azext_account/generated/_client_factory.py", line 24, in cf_alias
return cf_account(cli_ctx).alias
File "/home/nusrath/.azure/cliextensions/account/azext_account/generated/_client_factory.py", line 9, in cf_account
from ..vendored_sdks.subscription import SubscriptionClient
File "/home/nusrath/.azure/cliextensions/account/azext_account/vendored_sdks/subscription/__init__.py", line 9, in
from ._subscription_client import SubscriptionClient
File "/home/nusrath/.azure/cliextensions/account/azext_account/vendored_sdks/subscription/_subscription_client.py", line 12, in
from azure.core.rest import HttpRequest, HttpResponse
ModuleNotFoundError: No module named 'azure.core.rest'

```

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- _Put any pre-requisite steps here..._
- `az account alias create --name {} --billing-scope {} --display-name {} --workload {}`

## Expected Behavior

## Environment Summary
```
Linux-5.13.0-30-generic-x86_64-with-debian-11.0, Ubuntu 21.10
Python 3.6.10
Installer: DEB

azure-cli 2.29.2 *

Extensions:
account 0.2.2

```
## 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.