Azure APIM Policy, managed identity resource value from namevalue

34 Views Asked by At

I am trying to render managed identity resource value from name value This is in my code and deployment happens via the terraform.

values I have in name value are

enter image description here

I tried

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

after deployment it is rendered as

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

Then I tried

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

after deployment it is rendered as

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

It should render like this

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

Update This worked

<set-variable name="test" value="{{CRM-EWR-Resource-Client-Id_dev}}" />
    <authentication-managed-identity resource="@(context.Variables["test"] as string)" />
1

There are 1 best solutions below

0
Ali On

Following worked.

<set-variable name="test" value="{{CRM-EWR-Resource-Client-Id_dev}}" />
<authentication-managed-identity resource="@(context.Variables["test"] as string)" />