salmon-beard-79336
07/30/2019, 4:53 PMurl="${customResource.endpoint}"
white-balloon-205
policy: cutomResource.endpoint.apply(endpoint => JSON.stringify({ ... endpoint ... })
Depending on exactly what you are doing - there may be easier options.salmon-beard-79336
07/30/2019, 4:55 PMconst exampleApiOperationPolicy = new azure.apimanagement.ApiOperationPolicy("test-policy", {
apiManagementName: homePageOperation.apiManagementName,
apiName: homePageOperation.apiName,
operationId: homePageOperation.operationId,
resourceGroupName: homePageOperation.resourceGroupName,
xmlContent: `<policies>
<inbound>
<set-backend-service base-url="${staticWebsiteUrl}" />
</inbound>
<backend>
<forward-request timeout="30" follow-redirects="true" />
</backend>
</policies>
`,
});
high-translator-22614
07/30/2019, 4:57 PMpulumi.interpolate
salmon-beard-79336
07/30/2019, 4:58 PMinterpolate
function?white-balloon-205
pulumi.interpolate
should do what you want.
https://www.pulumi.com/docs/reference/programming-model/#outputs-and-stringssalmon-beard-79336
07/30/2019, 5:01 PMconst staticWebsiteUrl = pulumi.interpolate `${staticWebsite.endpoint}`;
....
xmlContent: `<policies>
<inbound>
<set-backend-service base-url="${staticWebsiteUrl}" />
....
Calling [toString] on an [Output<T>] is not supported.\n\nTo get the value of an Output<T> as an Output<string> consider either:\n1: o.apply(v => `pref..
white-balloon-205
xmlContent: pulumi.interpolate`...`
salmon-beard-79336
07/30/2019, 5:02 PMwhite-balloon-205
Output
more generally.salmon-beard-79336
07/30/2019, 5:04 PM