【问题标题】:Can I pull data from an existingAzure Storage Account table using ARM Templates?我可以使用 ARM 模板从现有 Azure 存储帐户表中提取数据吗?
【发布时间】:2021-09-30 12:47:19
【问题描述】:

我有一个现有的 Azure 存储帐户,其中包含一个表。该表包含一些我需要在我的 mainTemplate.json ARM 文件中使用的详细信息。我可以直接在 ARM 模板中提取这些值吗?

[concat(reference(resourceId('Microsoft.Storage/storageAccounts',parameters('storageAccountName'))).primaryEndpoints.table, parameters('tableName'))]

我一直在输出部分使用上述语句,它返回表 uri。我可以通过任何方式获取该表中的值吗?

【问题讨论】:

标签: azure azure-storage azure-resource-manager azure-table-storage


【解决方案1】:

正如 Silent 所建议的那样通过引用此link

尝试使用 DeploymentScriptOutputs

脚本接受一个参数,并输出参数值。 DeploymentScriptOutputs 用于存储输出。 例子

"outputs": {
    "result": {
      "value": "[reference('runPowerShellInlineWithOutput').outputs.text]",
      "type": "string"
    }
  }

在输出部分,值行显示如何访问存储的值。写输出用于调试目的。要了解如何访问输出文件,请参阅Monitor and troubleshoot deployment scripts

感谢@silent的建议

【讨论】:

    猜你喜欢
    • 2018-07-23
    • 2020-10-01
    • 2020-09-04
    • 1970-01-01
    • 2021-09-18
    • 2018-02-09
    • 2017-01-02
    • 2020-09-15
    • 2019-11-30
    相关资源
    最近更新 更多