azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

IoT Hub Create is not idempotent

Open tjprescott opened this issue 8 years ago • 6 comments

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.

tjprescott avatar Nov 08 '18 19:11 tjprescott

@iluican is this a bug we can fix?

jlian avatar Dec 11 '19 00:12 jlian

Not really.

iluican avatar Dec 18 '19 23:12 iluican

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.

iluican avatar Dec 20 '19 04:12 iluican

Another vote for fixing this. Azure CLI tries to ensure all commands are idempotent, so why not this one?

cocowalla avatar Jun 02 '20 10:06 cocowalla

@cocowalla Thank you for your comment. We will take another look and get back to you with our assessment.

iluican avatar Jun 02 '20 15:06 iluican

PR https://github.com/Azure/azure-cli/pull/13941

montgomp avatar Jun 12 '20 00:06 montgomp