IoT Hub Create is not idempotent
Describe the bug CLI command guidelines require CREATE commands to be idempotent: https://github.com/Azure/azure-cli/blob/dev/doc/command_guidelines.md
iot hub create has a client-side check for name availability that will cause the command to fail if run twice. This client-side check should be removed.
To Reproduce
Run az iot hub create ... twice with the same parameters. An error will be thrown.
Expected behavior The second call should succeed.
@iluican is this a bug we can fix?
Not really.
We've had an extensive conversation about this in our team, and we don't feel like the existing behavior can be changed. Let's follow up offline, there is too much to discuss over a github issue.
Another vote for fixing this. Azure CLI tries to ensure all commands are idempotent, so why not this one?
@cocowalla Thank you for your comment. We will take another look and get back to you with our assessment.
PR https://github.com/Azure/azure-cli/pull/13941