0
votes

I have created a HDI cluster and its associated storage account using Azure CLI 2.0 and ARM template.

Now I want to the delete the cluster using Azure CLI 2.0. But I don't find command option to delete it.

In Azure CLI 1.0 , I will delete a cluster using the following:-

azure hdinsight cluster delete <Cluster Name>

How can I delete a cluster using Azure CLi 2.0?

2

2 Answers

1
votes

According to azure documentation -

Azure CLI 2.0 does not support deleting HDInsight clusters at this time (October 23, 2017).

Have you explored doing cluster creation and delete using powershell instead?

1
votes

Currently, Azure CLI 2.0 does not support HDInsight clusters.

But if you only want to delete a HDI cluster, it is possible. You could use like below:

az resource delete --ids /subscriptions/{subscription Id}/resourceGroups/{resourceGroup Name}/providers/Microsoft.HDInsight/clusters/{cluster name}?

In fact, Azure CLI 2.0 is using Azure rest API, you could use --debug to check it. You could check HID rest API in this link. You also could use az resource create to create a HDI cluster if you want.