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

fancy-artist-45287

05/24/2023, 3:30 PM
How can I add these settings to a Static Web App with a pulumi typescript script? The resource azure-native.web.StaticSite does not have any config properties 🤷‍♂️
Cannot find any alternative in both azure native and azure classic npm packages
Publish Azure Static Web Apps using an ARM Template Looks like it can be specified with
azuredeploy.parameters.json
when using ARM event tho the Microsoft.Web/staticSites does not mention it at all...
m

millions-journalist-34868

05/24/2023, 7:57 PM
It seems something is missing in the Azure RM APIs, maybe you should raise an issue for Microsoft to correct that.
f

fancy-artist-45287

05/24/2023, 8:43 PM
I could do that but where do I raise it?
m

millions-journalist-34868

05/24/2023, 8:50 PM
I am not sure but I think you can try in 2 places: • create an issue in this repository • create an issue directly from the Microsoft documentation where the config is missing (on the bottom of the Ms docs pages, there is a feedback section that would make you create an issue on the docs repository)
f

fancy-artist-45287

05/24/2023, 9:08 PM
b

blue-potato-57538

05/30/2023, 7:23 AM
@fancy-artist-45287 did you tried to use https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappapplicationsettings/ ? For the web app or function app, even if they have the app setting property inside the resource doesn't mean that, that is the way to go, because if you do it that way, and you will adjust the settings in the portal, on a refresh it will not capture the drift. This is why you need to use the resource i provided up.
f

fancy-artist-45287

05/30/2023, 7:33 AM
Yes I tried it even tho it is not a function app or web app but a static site resource. It did not work.
b

blue-potato-57538

05/30/2023, 7:39 AM
I suppose you are left with doing it with azure sdk : https://learn.microsoft.com/en-us/rest/api/appservice/static-sites/create-or-update-static-site-app-settings?tabs=JavaScript Or i can see there is an open issue on pulumi side about this one: https://github.com/pulumi/pulumi-azure-native/issues/2326 So if is not working maybe you can reply there, as from my side i think there is support on the arm api, but possible not implemented yet on pulumi side: https://learn.microsoft.com/en-us/azure/templates/microsoft.web/2022-03-01/staticsites[…]/config-appsettings?pivots=deployment-language-arm-template
f

fancy-artist-45287

05/30/2023, 11:41 AM
Thanks a bunch @blue-potato-57538 you seem to have found some new info on this that I was not able to find when dealing with this issue
3 Views