Skip to content

Commit 47a586a

Browse files
committed
Fix title typo and improve code formatting in App Services Managed Certificates post
1 parent c65810e commit 47a586a

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

_posts/2023-10-31-App-Services-Managed-Certificates.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
---
2-
title: "Create a (free!) App Services Managed Managed Certificates with Bicep"
2+
title: "Create a (free!) App Services Managed Certificates with Bicep"
33
date: 2023-10-30 00:00:00 +1000
44
categories: Azure
55
tags:
66
- Azure
77
- Bicep
88
excerpt_separator: <!--more-->
99
---
10-
11-
## Create a (free!) App Services Managed Certificate with Bicep
12-
1310
An certificates in Azure App Services is bind to an host name, this can be an apex (or naked) domain (<https://robertdeveen.com>) or a subdomain (<https://www.robertdeveen.com> or <https://subdomain.robertdeveen.com>), or a combination of these two (for example one certificate for <https://robertdeveen.com> and <https://www.robertdeveen.com>).
1411

1512
To create an App Services Managed Certificate there are two ways to create a certificate with Bicep. One for a apex domain and one for an subdomain. The validation of the ownership of the domain is the main difference. To generate a certificate the certificate authority would like to validate that the domain you try to get a certificate for is yours. That you are the owner of that (sub)domain name.
@@ -20,7 +17,7 @@ As a prerequisite you need to have an App Service Plan and an App Service or Fun
2017

2118
## Create a Host Name binding without a certificate
2219

23-
```Bicep
20+
{% highlight bicep %}
2421
param customHostname string = 'www.robertdeveen.com'
2522
param webAppName string = 'robertdeveen'
2623

@@ -35,8 +32,7 @@ resource hostNameBindingWithoutCertificate 'Microsoft.Web/sites/hostNameBindings
3532
sslState: 'Disabled'
3633
}
3734
}
38-
39-
```
35+
{% endhighlight %}
4036

4137
## Create a App Services Managed Certificate for a subdomain
4238

@@ -50,8 +46,7 @@ In the DNS Zone, create a CName record pointing to *.azurewebsite.net. This is n
5046

5147
### Create a App Services Managed Certificate
5248

53-
```Bicep
54-
49+
```bicep
5550
param canonicalName string = 'www.robertdeveen.com'
5651
param appServicePlanName string = 'robertdeveen-plan'
5752
param location string = 'westeurope'
@@ -123,7 +118,7 @@ resource nakedCertificate 'Microsoft.Web/certificates@2022-09-01' = {
123118

124119
We need to use a module to enable the certificate on the host name, as Bicep/ARM forbids using resource with this same type-name combination twice in one deployment.
125120

126-
```Bicep
121+
```bicep
127122
module hostnameBindingWithCertificate './modules/hostname-binding.Bicep' = {
128123
name: '${customHostname}-hostnamebinding'
129124
params: {
@@ -136,7 +131,7 @@ module hostnameBindingWithCertificate './modules/hostname-binding.Bicep' = {
136131

137132
### `./module/hostname-binding.Bicep`
138133

139-
```Bicep
134+
```bicep
140135
resource hostNameBindingWithCertificate 'Microsoft.Web/sites/hostNameBindings@2022-03-01' = {
141136
name: '${webAppName}/${customHostname}'
142137
properties: {

0 commit comments

Comments
 (0)