microsoft / service-fabric-scripts-and-templates

A collection of useful Service Fabric scripts and Resource Manager templates.
MIT License
23 stars 57 forks source link

Custom Policy Giving Issues on Deployment #19

Open ghost opened 6 years ago

ghost commented 6 years ago

I am trying to use the example APIM deployment templates and I have modified them a bit and everything works fine, until I put in my policy which is:

<policies>
<inbound>
<base />
<set-backend-service backend-id="servicefabric" sf-service-instance-name="@("fabric:/" + context.Request.MatchedParameters["serviceName"] + "/" + context.Request.MatchedParameters["serviceName"] + ".Api")" />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>

Than I start seeing error which says something like that it was expecting a blank space after @ but got 'fabric' instead. Any idea what that is about??

This could be due to my lack of understanding of how PowerShell treats ARM deployment templates so please bear with me, Thanks! :-)

ghost commented 6 years ago

Hey @rwike77, I've been waiting a response here but got nothing. Maybe you can help me out since you seem to be the last person who committed to the APIM templates :)

mattfrear commented 5 years ago

Yeah, I have problems with it too. I can put anything in the policyContent field and I always get the same very unhelpful error. Have burnt hours on this.

"error": {
    "code": "BadRequest",
    "message": ""
  }