I'm trying to create some storage accounts which have static hosting enabled. I know this feature isn't available in the ARM api and there is an example in the docs where a custom dynamic provider is used (for the TS example). I can also see that dynamic providers are not supported in .NET at the moment.
My question is how can enable the static hosting using Pulumi and C#?
If I was able to get the name of the storage account I can try doing this in a similar way to the dynamic provider above either via the CLI or via the Storage SDK but I have the issue with Output to string conversion which I know is fundamental to the way resources are created in Pulumi but is there a way at any point to retrieve the value of the resource as string (or convert it to a string)?
Hope that's clear - any help is appreciated!
The text was updated successfully, but these errors were encountered:
I wonder if I can execute the azure storage sdk command in that apply method?
I realised I'll need the static endpoint url for another step managed by Pulumi, that's not exposed in the API, in your TS example you query the CLI to return it but in my case I need to pass that to an app gateway component that is also being provisioned by Pulumi.
This would be so much simpler if the Azure resource manager supported this out of the box!
You should be able to execute any command (or pretty much any C#) in that Apply. The commands need to be idempotent, because they will run on any pulumi up (and on subsequent previews after the storage account is created).