Azure DevOps 和 Azure 资源部署:使安全字符串输出可用
Azure DevOps and Azure Resource Deployment: make securestring output available
上下文:
我通过 ARM 模板创建了一个存储帐户,输出如下(以及其他):
"storageAccountKey": {
"type": "securestring",
"value": "[listKeys(parameters('storageAccountName'), '2018-02-01').keys[0].value]"
}
在下一步中,我将部署输出转换为 Azure DevOps 环境变量,以便后续 PowerShell 任务可以访问它们。
问题:
对于 'string' 类型的输出,这可以正常工作,但对于 'securestring' 类型则不行,因为该值在部署输出字符串中不可用。
问题:
如何使 ARM 部署的类型 'securestring' 的输出可用作安全的 Azure DevOps 环境变量?
谢谢
编辑:
我当然可以直接在 PowerShell 任务中查询帐户密钥,但我想了解如何使安全字符串输出可用。
我认为你做不到。 securestring 类型始终被省略。你应该做的是使用 powershell 获取密钥并在脚本中使用它
上下文:
我通过 ARM 模板创建了一个存储帐户,输出如下(以及其他):
"storageAccountKey": {
"type": "securestring",
"value": "[listKeys(parameters('storageAccountName'), '2018-02-01').keys[0].value]"
}
在下一步中,我将部署输出转换为 Azure DevOps 环境变量,以便后续 PowerShell 任务可以访问它们。
问题:
对于 'string' 类型的输出,这可以正常工作,但对于 'securestring' 类型则不行,因为该值在部署输出字符串中不可用。
问题:
如何使 ARM 部署的类型 'securestring' 的输出可用作安全的 Azure DevOps 环境变量?
谢谢
编辑: 我当然可以直接在 PowerShell 任务中查询帐户密钥,但我想了解如何使安全字符串输出可用。
我认为你做不到。 securestring 类型始终被省略。你应该做的是使用 powershell 获取密钥并在脚本中使用它