Azure APIM 策略,来自名称值的托管标识资源值

问题描述 投票:0回答:1

我正在尝试从名称值呈现托管身份资源值 这是在我的代码中,部署是通过 terraform 进行的。

我的名称值是

我试过了

<authentication-managed-identity resource="{{CRM-EWR-Resource-Client-Id}}" />

部署后呈现为

<authentication-managed-identity resource="{{CRM-EWR-Resource-Client-Id}}" />

然后我尝试了

<authentication-managed-identity resource="CRM-EWR-Resource-Client-Id" />

部署后呈现为

<authentication-managed-identity resource="CRM-EWR-Resource-Client-Id" />

它应该像这样渲染

<authentication-managed-identity resource="de08357d-b6c-454-wew-21321sd" />

更新 这有效

<set-variable name="test" value="{{CRM-EWR-Resource-Client-Id_dev}}" />
    <authentication-managed-identity resource="@(context.Variables["test"] as string)" />
azure azure-api-management azure-policy
1个回答
0
投票

以下有效。

<set-variable name="test" value="{{CRM-EWR-Resource-Client-Id_dev}}" />
<authentication-managed-identity resource="@(context.Variables["test"] as string)" />
© www.soinside.com 2019 - 2024. All rights reserved.