white-match-80969
06/26/2021, 7:26 PMtall-librarian-49374
06/26/2021, 8:08 PMwhite-match-80969
06/27/2021, 5:13 AMvar hostNameBinding = new WebAppHostNameBinding(
$"{stackName}-webapp-hostname-binding",
new WebAppHostNameBindingArgs
{
HostName = "<http://mysub.mydomain.com|mysub.mydomain.com>",
Name = webApp.Name,
ResourceGroupName = resourceGroup.Name,
// SslState = SslState.SniEnabled,
// Thumbprint = certificate.Thumbprint // <-- This needs to be set but I'm not sure how
});
var certificate = new Certificate(
$"{stackName}-webapp-certificate",
new CertificateArgs
{
CanonicalName = "<http://mysub.mydomain.com|mysub.mydomain.com>",
Kind = "ManagedCertificate",
ResourceGroupName = resourceGroup.Name,
ServerFarmId = appServicePlan.Id
});
tall-librarian-49374
06/27/2021, 3:41 PMWebAppHostNameBinding
have to be before Certificate
?white-match-80969
06/27/2021, 3:52 PMCertificate
first results in the following error:
"Properties.CanonicalName is invalid. Certificate creation requires hostname mysub.mydomain.com added to an App Service in the serverFarm ...."tall-librarian-49374
06/27/2021, 4:33 PMwhite-match-80969
06/28/2021, 5:02 AMtall-librarian-49374
06/28/2021, 6:25 AMwhite-match-80969
06/28/2021, 6:45 AM