You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2023-10-31-App-Services-Managed-Certificates.md
+15-20Lines changed: 15 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,12 @@
1
1
---
2
-
title: "Create a (free!) App Services Managed Managed Certificates with Bicep"
2
+
title: "Create a (free!) App Services Managed Certificates with Bicep"
3
3
date: 2023-10-30 00:00:00 +1000
4
4
categories: Azure
5
5
tags:
6
6
- Azure
7
7
- Bicep
8
8
excerpt_separator: <!--more-->
9
9
---
10
-
11
-
## Create a (free!) App Services Managed Certificate with Bicep
12
-
13
10
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>).
14
11
15
12
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
20
17
21
18
## Create a Host Name binding without a certificate
> Note: The documentation is not clear about the meaning of the `domainValidationMethod` field, it is a string. But the value that is accepted should be `cname-delegation` or `http-token`. Other values give the error message: **"The parameter Properties.DomainValidationMethod has an invalid value."**
76
71
The value `cname-delegation` is the only one working these days. The value `http-token` is not working anymore and just waiting a long time to end. The best solution is to not add that field.
@@ -83,9 +78,9 @@ In the DNS Zone, create an A records pointing to the IP address of the webapp. T
## Create a App Services Managed Certificate for an apex and subdomain
103
98
104
99
**THIS DOESN'T WORK!** The documentation is not clear about this, but it is not possible to create a certificate for an apex and subdomain at the same time. You need to create two certificates, one for the apex and one for the subdomain.
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.
0 commit comments