azure cli command az webapp create not idempotent any more??
Describe the bug
Hi, When running this command in a azure devop pipeline (hosted by microsoft), it always fail at the second run. If I delete the web app and run the command, it will succeed. But second run will fail again. The command is:
$output = az webapp create -g ThunderEuwUat -p 'ASP-Thunder-DataLookup-ProductserviceEuwPreP' -n 'ThunderDataApiV2-ThunderEuwUat1' --runtime ''dotnet:7'' --assign-identity [system] --tags 'Business Criticality=yes' 'Data Classification=United Kingdom' 'Family=Core' 'Product=Thunder' 'Owner=Savvas' 'Environment=PreProd' 'Location=westeurope' 'Data Sovereignty=Proprietary' 'Data Transfer Restrictions=Global UK' if (!$?){Throw}
Related command
az webapp create
Errors
2024-06-03T13:56:01.2805576Z WARNING: Webapp 'ThunderDataApiV2-ThunderEuwUat1' already exists. The command will use the existing app's settings. 2024-06-03T13:56:08.6266647Z ERROR: Unable to retrieve details of the existing app 'ThunderDataApiV2-ThunderEuwUat1'. Please check that the app is a part of the current subscription
Issue script & Debug output
2024-06-11T10:23:38.2768966Z Downloading task: AzureCLI (2.239.4) 2024-06-11T10:23:39.0898640Z ##[debug]Task 'AzureCLI' has been downloaded into '024-06-11T10:26:00.6194296Z ##[debug]Agent environment resources - Disk: D:\ Available 12281.00 MB out of 14333.00 MB, Memory: Used 1955.00 MB out of 7167.00 MB, CPU: Usage 2.70% 2024-06-11T10:26:01.5150228Z ERROR: Unable to retrieve details of the existing app 'ThunderDataApiV2-ThunderEuwUat'. Please check that the app is a part of the current subscription 2024-06-11T10:26:02.7868521Z ScriptHalted
Expected behavior
command should succeed even if the site has been created before.
Environment Summary
task: AzureCLI (2.239.4)
Additional context
No response
API change check
API changes are not detected in this pull request.
Thank you for opening this issue, we will look into it.
hi, any update?
hi, any update?
Also running into this issue
Unable to repro. Can you please share what changes you are making when you try to run the command a second time? We haven't made any changes that would change whether or not this command was idempotent. I just ran the same create command twice and both succeeded. Please update to the latest CLI version and let us know if this is still an issue.
Closing for now due to no response. Please comment if the issue still persists and we can re-open and investigate further.