【发布时间】:2021-10-04 01:56:40
【问题描述】:
我最近发现,当您从ARM Template 部署Azure ML 实例时,MSI 将覆盖Key Vault 的清除保护设置。它将在Key Vault 上启用清除保护。这不是我要寻找的行为,因为当尝试再次部署它时,模板将失败,指出同名的 Key Vault 已经存在,并且您无法在保留期之前删除。
如果您手动部署 Azure ML 实例并选择 Key Vault,它将保留禁用清除设置。有什么想法可以让我们保持禁用清除功能吗?
我们使用的 Azure ML 属性如下所述:
{
"type": "Microsoft.MachineLearningServices/workspaces",
"apiVersion": "2020-09-01-preview",
"name": "[variables('machineLearningWorkspaceName')]",
"location": "[parameters('location')]",
"identity": {
"type": "[parameters('amlManagedIdentityOption')]"
},
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
"[resourceId('Microsoft.Insights/components', variables('applicationInsightsName'))]",
"[resourceId('Microsoft.ContainerRegistry/registries', variables('containerRegistryName'))]"
],
"tags": "[parameters('resourceTags')]",
"properties": {
"friendlyName": "[variables('machineLearningWorkspaceName')]",
"storageAccount": "[variables('storageAccount')]",
"keyVault": "[variables('keyVault')]",
"applicationInsights": "[variables('applicationInsights')]",
"containerRegistry": "[ variables('containerRegistry')]",
"adbWorkspace": "[variables('adbWorkSpace')]",
"hbiWorkspace": "[parameters('confidential_data')]",
"allowPublicAccessWhenBehindVnet": "[parameters('allowPublicAccessWhenBehindVnet')]"
}
}
在 Key Vault ARM 上,我们具有以下属性:
"properties": {
"enabledForDeployment": "[parameters('enabledForDeployment')]",
"enabledForTemplateDeployment": "[parameters('enabledForTemplateDeployment')]",
"enabledForVolumeEncryption": "[parameters('enableVaultForVolumeEncryption')]",
"softDeleteRetentionInDays": 7,
"tenantId": "[subscription().tenantId]",
"copy": [
{
"name": "accessPolicies",
"count": "[length(parameters('userObjectId'))]",
"input": {
"tenantId": "[subscription().tenantId]",
"objectId": "[parameters('userObjectId')[copyIndex('accessPolicies')].Id]",
"permissions": "[parameters('userObjectId')[copyIndex('accessPolicies')].Permissions]"
}
}
【问题讨论】:
-
是否可以在 Azure 门户中查找或与部署模板进行比较?当我尝试使用新的密钥库清除设置从 Azure 门户进行部署时,默认情况下已启用。您是否使用过关闭清除设置的现有密钥库?如果您也从门户创建新的密钥库,您是否也看到类似的行为?
-
感谢您与我们联系。在门户中,如果选择禁用了清除保护的现有 Key Vault,它将在完成 Azure ML 部署后保持禁用状态。
-
在密钥库臂上,您应该可以设置
enablePurgeProtection: false。
标签: azure azure-devops azure-resource-manager azure-machine-learning-studio infrastructure-as-code