0

When I read the doc for both slot and site,

  1. Website: https://learn.microsoft.com/en-us/azure/templates/microsoft.web/2018-02-01/sites
  2. Deployment slot: https://learn.microsoft.com/en-us/azure/templates/microsoft.web/2018-11-01/sites/slots

I can see that I can apply application settings by adding to properties.siteconfig.appsettings to either the website or a slot. This I how I do it today for the website, but I am wondering if, even though the deployment slot has the same structure, if I can add settings to my slot by doing the same? I don't care about sticky settings. The reason why I am asking is that when I export from the portal I can't see how they do it and everywhere I look on the Internet people is using the Microsoft.Web/sites/config type or Microsoft.Web/sites/slots/config type. Can't i just use properties.siteconfig.appsettings as in the doc for the deploy slot, or am I missing something fundamental?

I am not in a position where I can go to a computer and test it, but my mind is going nuts to find out.

2
  • why would it have the other structure, its the same entity (deployment slot) just called differently, no? Commented Jul 14, 2019 at 14:43
  • @4c74356b41 well good question, but when I Google it all others is referring to a resource type called "Microsoft.Web/sites/slots/config" and "Microsoft.web/sites/config". I have never used those to config my sites with so I am just curious if I am missing something. In my head I should just be able to fill out properties.siteconfig.appsettings for the slots, because, as I understand, when you have no slots and deploy, you actually deploy to the production slot, which is nameless. Commented Jul 14, 2019 at 14:52

1 Answer 1

1

You could indeed configure the appsettings through the siteconfig tag. As for your puzzle, it's because you don't understand why there are two ways to set the appsettings.

Actually the siteconfig is used to Prevent copying settings from the Prod site, you could check the github pull.

Hope this could help you.

Sign up to request clarification or add additional context in comments.

4 Comments

So just to be clear, I can configure the slot with the siteconfig? I only use it to warm up before switching so there will always be a 1 to 1 between the staging and production slot.
Aaaah. If I add the siteconfig with appsettings on the slot it doesn't copy the production slot settings when the slot is created the first time?
From this SO answer and the github description, yes it is.
Thanks. I will presume that it is possible to configure a slot with the siteconfig and it will update when I add settings to it and redeploy the arm. Sorry for being so pedantic but I have had many experiences with ARM where I thought I knew how it worked but I was surprised to find out otherwise.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.