-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
staticSites API is not idempotent -- requires isForced
query parameter for redeployment
#7500
Comments
Just confirming that there is no capability to add parameters to the PUT query string through Bicep or ARM Templates. I can't comment on whether there is another workaround for |
Thanks for confirming @anthony-c-martin! Do you know if there is any guidance for the development of resource providers to avoid uri parameters to be compatible with IaC? |
The guidance to all RPs is to make sure all of their resources are deployable via ARM Templates/bicep, so if a query string parameter is required for deployment, they should change that such it is in the PUT request body. The more concerning part of what you are reporting is that the API is not idempotent. It is ok for a property to not be modifiable, but if there were no property changes then it should re-deploy successfully. I would recommend opening a support case for this one. @seligj95 / @naveedaz -- do you have a good contact on the static sites team that can help look into this? |
Exactly, I don't think it's a problem in general, if some parameters like |
isForced
query parameter for redeployment
@BandaruDheeraj for visibility |
Is your feature request related to a problem? Please describe.
There is a nearly 1 year old implementation issue in the Static Web Apps (staticSites) provider that blocks idempotent deployments when user defined function apps are used (Azure/static-web-apps#576).
The problem is that as soon as the
userDefinedFunction
property was set once, it cannot be overwritten and the resource provider even throws a error with the exact same configuration because the field seems to be write protected internally.There is a uri parameter called
isForced
that has to be set to overwrite this property, but it is only available in the REST API (https://docs.microsoft.com/en-us/rest/api/appservice/static-sites/register-user-provided-function-app-with-static-site#uri-parameters) and that should be used like thisPUT https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/staticSites/testStaticSite0/userProvidedFunctionApps/testFunctionApp?isForced=true&api-version=2021-02-01
Is there any way in Bicep or ARM templates to reference URI parameters or has anyone an idea of a proper workaround to be able to use IaC with staticSites?
The text was updated successfully, but these errors were encountered: