我正在构建一组脚本和模板以在 Azure 中创建 Service Fabric 群集。我有一个脚本,可以创建一个密钥库和一个自签名证书,并成功地将其上传到库中。另一个脚本创建集群,但在证书链接到虚拟机时遇到错误。该New-AzureRmResourceGroupDeployment
命令的错误是:-
{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "KeyVaultAccessForbidden",
"message": "Key Vault https://VAULT-NAME.vault.azure.net/secrets/clusterCert/SECRET-ID either has not been enabled for deployment or the vault id provided, /subscriptions/SUBSCRIPTION-ID/resourceGroups/jg-sf/providers/Microsoft.KeyVault/vaults/VAULTNAME, does not match the Key Vault's true resource id."
}
]
}
}
VAULT-NAME、SUBSCRIPTION-ID 和 SECRET-ID 都是正确的。已使用参数 创建了密钥保管库"enabledForTemplateDeployment": true
,如以下屏幕截图所示。
我的脚本和模板可以在 GitHub - https://github.com/goochjs/azure-testbed中看到。
如何诊断问题?
谢谢,
杰里米。