如何使用 Terraform 清除软删除的 APIM?

发布时间:2021-03-04 00:39

Azure API 管理现在是“软删除”,如果它被误删除,您可以恢复它。

Creating Azure API Management using deleted name results in name "already in use" error

当使用 terraform destroy 时,它会进行软删除,这使得开发变得棘手,因为您经常想要重新创建它。

如何使用 terraform 清除软删除的 APIM?

回答1

遇到了同样的事情,我对如何调用这个 API 的快速研究:

az rest --method delete --header "Accept=applicaiton/json" -u 'https://management.azure.com/subscriptions/{SubscriptionId}/providers/Microsoft.ApiManagement/locations/{eastus}/deletedservices/{api name}?api-version=2020-06-01-preview'