This repository contains example code for creating an Azure Web App with a Let's Encrypt SSL Certificate. It uses the ACMESharp Powershell module. This certificate is valid for 90 days.
Install-Module AzureRM -AllowClobber
Install-Module ACMESharp -AllowClobber
All the code needed to set up a Web App, generate the certificate, and bind the certificate is contained in the CreateLetsEncryptWebApp.ps1 script. The script does the following:
If the Web App already exists, it will simple generate a new cert and bind it, effectively renewing the certificate.
To call the script:
.\CreateLetsEncryptWebApp.ps1 -ResourceGroupName "RESOURCE-GROUP-NAME" `
-WebAppName "WEB-APP-NAME" -Fqdn "DOMAIN NAME" -Location "LOCATION (e.g. eastus)" `
-ContactEmail "EMAIL ADDRESS FOR REGISTRATION"