我从快速入门模板(https://github.com/Azure/azure-quickstart-templates/blob/master/101-functions-managed-identity/azuredeploy.json)中获取了模板。
我想将“ @ Microsoft.KeyVault(SecretUri = secret_uri_with_version)”应用程序设置添加到我的ARM模板中的密钥库中。我怎样才能做到这一点?假设我的密钥库名称是“ MyKeyVault”,而我的秘密名称是“ MySecret”。我从MS文档中发现,这种参考应该有效:
storyboard
但是我只收到错误消息“模板中未定义资源'Microsoft.KeyVault / vaults / MyKeyVault'。”
我正在使用此行创建资源ID:
from multiprocessing import process
import os
import stat
func = stat.fchmod
p1 = process(func, args=("somefile", stat.S_IEXEC))
p2 = process(func, args=("somefile", stat.S_IREAD))
p1.start()
p2.start()
p1.join()
p2.join()
# what this will be, some random value or decided by which process executed last?
os.stat("somefile").ST_MODE
答案 0 :(得分:1)
啊,好的,我知道了,您正在尝试从Key Vault而不是从机密中获取参考。密钥库显然不具有该属性,因为它不是秘密,而是密钥库。因此,您需要构造对您的秘密的引用:
var query = (from c in ClientProperties()
join p in db.Properties.Where(wc => wc.Contract == _contractId) on c.PROPREF equals p.PROPREF into cp
from found in cp.DefaultIfEmpty()
where found == null
select new
{
UPRN = c.PROPREF,
Address = c.Location_address_1
}).ToList();