Azure ARM template add deployer object id to key vault access policies

烂漫一生 提交于 2021-01-28 05:27:37

问题


I have a service principal which I am using to deploy key vault. How can I fetch that service principals object id automatically with ARM template similarly as I can fetch MSI object id with line:

"objectId": "[reference(concat('Microsoft.Web/sites/', variables('function')), '2018-02-01', 'Full').identity.principalId]",

回答1:


I dont think you can. Your only option would be to pass it from the level above (ie from the powershell script that is invoking the template). Also, if you want to do that just to read data from the Key Vault in the template - you don't need that. Advanced Access Policies do that instead.



来源:https://stackoverflow.com/questions/61308250/azure-arm-template-add-deployer-object-id-to-key-vault-access-policies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!