Azure / Azure/azure-sdk-for-python

ImportError: cannot import name 'DeploymentWhatIf' from 'azure.mgmt.resource.resources.models'

Open
#45,057 1 comment 0 reactions 1 assignee Claimed by @msyyc View on GitHub
customer-reported Mgmt needs-team-attention question Resources
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

- **Package Name**:
- azure-mgmt-resource
- **Package Version**:
- 25.0.0
- **Operating System**:
- Linux
- **Python Version**:
- 3.11
**Describe the bug**
Before release of this version , "from azure.mgmt.resource.resources.models import DeploymentWhatIf, DeploymentWhatIfProperties" was working as expected.
Now it is throwing "ImportError: cannot import name 'DeploymentWhatIf' from 'azure.mgmt.resource.resources.models'" error

**To Reproduce**
Steps to reproduce the behavior:
1. Just run a python script importing - "from azure.mgmt.resource.resources.models import DeploymentWhatIf, DeploymentWhatIfProperties"
2. use 'DeploymentWhatIf'
3. when you execute the code it will download the latest 'azure-mgmt-resource'
4. Where it throws the "ImportError: cannot import name 'DeploymentWhatIf' from 'azure.mgmt.resource.resources.models'"
5. Looks like 'DeploymentWhatIf' is removed.

**Expected behavior**
It was running previous a day before this version release now started to throw the error.

**Screenshots**
If applicable, add screenshots to help explain your problem.

Image

**Additional context**
Add any other context about the problem here.

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.