@Timo Holm You should define api_management_named_value before you are creating the policy. You should use depends_on for Explicit Dependencies. The same is define in the Note section here.
Azure API manangement ip-filter using a named value
Timo Holm
71
Reputation points
Can I use Azure API management (APIM) named value in Inbound policy ip filter?
I have a configuration snippet
<policies>
<inbound>
<set-backend-service backend-id="mybackend" />
<ip-filter action="allow">
<address>{{ip1}}</address>
<address>{{ip2}}</address>
</ip-filter>
ip1 and ip2 are named values in APIM. When I try to provision this via Terraform, Terraform gives an error
{"code":"ValidationError","message":"Error in element 'address' on line 5, column 14: Cannot find a property 'ip1'","target":"address"} .
If I set ip:s direcly into address blocks, the policy works fine.