I created hdinsight according to the official documentation,Terraform Registry
and set network following:
network {
connection_direction = “Outbound”
private_link_enabled = true
}
storage_account {
storage_container_id = data.azurerm_storage_container.hd.id
is_default = true
storage_account_key = data.azurerm_storage_account.hd.primary_access_key
}
and Appear error:
creating HDInsight Hadoop Cluster “xxx” (Resource Group “xxx”): hdinsight.ClustersClient#Create: Failure sending request: StatusCode=400 – Original Error: Code=“BadRequest” Message=“Resource ID is missing or invalid but required for storage account uniqatest0123 when NetworkProperties has ResourceProviderConnection set to Outbound. The ID takes format like /subscriptions/$SUBSCRIPTION_ID/resourceGroups/$RESOURCE_GROUP/providers/Microsoft.Storage/storageAccounts/$ACCOUNT_NAME and can be found in Storage Account Properties from Azure Portal”
it should be setting like this:
storage_account {
storage_container_id = data.azurerm_storage_container.hd.id
storage_resource_id = data.azurerm_storage_account.hd.id
is_default = true
storage_account_key = data.azurerm_storage_account.hd.primary_access_key
}
then it is ok.