sjkp / letsencrypt-azure

The easiest way to use lets encrypt certificates on Azure
110 stars 35 forks source link

Multiple web sites support #3

Closed martin1cerny closed 5 years ago

martin1cerny commented 5 years ago

Hi @sjkp , I'd like to thank you for the great work you have been doing. I love this approach of standalone deployment taking care of wildcard certificate and the web app. Is there a way to keep a list of applications updated as well?

sjkp commented 5 years ago

Yes you can actually. However doing it by configuring everything from an ARM template might be a bit of a hassle.

If you look at the InstallOrRenewCertificate(ILogger log) function in the Helper.cs file, you can see that it registeres the AppSettings which holds the web apps that should have the certificates applied

.AddAzureAppService(Configuration.GetSection("AzureAppService").Get<AzureWebAppSettings>())

Actually this AddAzureAppService method allows an array of AzureWebAppSettings to be added, and if you do that, it will iterate over all the web apps and apply the certificate.

sjkp commented 5 years ago

And sorry for the slow response, have been too busy.

martin1cerny commented 5 years ago

This is great. Than you very much!

Almeonamy commented 5 years ago

@sjkp Hello. Can you describe it in more detail? What we need to do to request wildcard certificates on 2 App Service on 2 different domains?

scp-mb commented 4 years ago

@sjkp It's not immediately obvious how to pass an array of AzureWebAppSettings when deploying from the provided template using app settings via the Azure Portal.

Would you be able to give an example of how to have the function app add the certificate to multiple apps?