Hi Iain Dobson,
Thank you for reaching out to us on the Microsoft Q&A forum.
The option mentioned by you: The webAppName parameter will have a different value every time the template gets deployed as correct, is valid in case if we deploy a template with uniquestring() function to different resource groups or subscriptions.
The second option given in knowledge check is right because “when you redeploy the template to the same resource group, the value of the webAppName remains the same is correct in this case because we are deploying the template to the same resource group”.
The uniqueString() function is useful for creating globally unique resource names. It returns a string that's the same on every deployment to the same resource group, but it is different when you deploy to different resource groups or subscription.
We hope we have resolved your issue. Please don't hesitate to reach out to us if you have any other queries.
Please Accept the answer if you have found this helpful so that it is helpful for others in the community.