https://pulumi.com logo
#azure
Title
# azure
d

delightful-truck-1268

02/12/2020, 5:00 PM
I'm looking to configure a CDN endpoint with entries for the Rules Engine. I found docs on creating profiles and endpoints, but nothing about configuring Rules Engine
c

clever-sunset-76585

02/12/2020, 6:53 PM
Are you looking to use the Standard Rules Engine or the Premium one from the
Premium_Verizon
SKU?
d

delightful-truck-1268

02/12/2020, 7:04 PM
Standard
Thoughts? Looks like the azcli supports the commands now
c

clever-sunset-76585

02/14/2020, 4:35 AM
Apologies for going dark on you. I just looked into this and unfortunately, it doesn’t look like we support the “Rule” resource at this time. I assume these are the Azure CLI commands, that you are talking about? https://docs.microsoft.com/en-us/cli/azure/cdn/endpoint/rule?view=azure-cli-latest In any case, the only workaround that comes to my mind is, for you to implement a Pulumi Dynamic Provider for exactly this sort of thing. We have a blog post that has some examples towards the end: https://www.pulumi.com/blog/dynamic-providers/ To be brief, you’d just be implementing couple of interfaces (assuming you are using either JS, TS or Python, as only those are supported) Specifically, you’d want to follow this example: https://github.com/pulumi/examples/tree/master/azure-ts-static-website. It shows you how you can use Dynamic Providers to execute Azure CLI commands. The only thing I am not sure of with the dynamic provider approach is, if later, the Rule resource becomes available, how you could port over to that. Perhaps using
aliases
? cc @tall-librarian-49374 to see if he has any other suggestions.
t

tall-librarian-49374

02/14/2020, 7:09 AM
Makes sense to me. I’m puzzled because I can’t seem to find an issue in the terraform azurerm repo. Did you by chance see any @clever-sunset-76585 ?
c

clever-sunset-76585

02/14/2020, 3:19 PM
Did you by chance see any @clever-sunset-76585 ?
Sadly, no 😞 I searched the issues repo and no one seems to have mentioned it, probably because the Standard Rules engine seems to be a recent addition. Rules engine was previously only a
Premium_Verizon
SKU thing offered only by Verizon. But it now seems that MS has added their own rules engine for their own CDN SKU as well. The history on that MS docs page shows that it was only added on Nov 1, 2019 (https://github.com/MicrosoftDocs/azure-docs/commits/master/articles/cdn/cdn-standard-rules-engine.md)
d

delightful-truck-1268

02/14/2020, 6:16 PM
Yeah it was in the most recent release of the aws cli
c

clever-sunset-76585

02/18/2020, 5:32 PM
Yeah it was in the most recent release of the aws cli
Did you mean the azure CLI?
d

delightful-truck-1268

02/27/2020, 9:33 PM
Ah yes, sorry—the Azure CLI
3 Views