Apex domain in Azure Front Door via bicep template never validates #10326
-
Bicep version Describe the bug We can register the domain from the portal without any issue but when we redeploy our bicep template the association in Front Door is removed, and the domain does not validate unless we manually update it from the portal. To Reproduce
Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hi @Gansted In order for the domain to validate, it requires that you create a TXT record to show that you own the domain. Did you complete that step ? If you are using Azure DNS, you can generate the DNS TXT record in your Bicep deployment. here is a sample of using the output from the customDomains creation // to do figure out to the check domain validation, move this to nexted deployment
var createTXTVerify = custom_domains.properties.domainValidationState == 'Approved' ? false : true So based on this if it's deployed and not approved, you can take this other value and create the DNS entry with the validationToken.
If you are not using Azure DNS, then you can manually create this TXT record in your DNS Server and it will validate once it is able to read the records.
|
Beta Was this translation helpful? Give feedback.
-
I tried this solution out and am getting Error BCP159: The resource "CDN" does not contain a nested resource named "customDomain". Known nested resources are: . |
Beta Was this translation helpful? Give feedback.
full sample standalone
main.bicep