I am using bicep to configure the site and DNS. Currently, I can configure it when using the subdomain (e.g www.foilen-lab.me) by using a CNANE, but for the main (e.g foilen-lab.me), I cannot use a CNAME and must use the IP. How can I get the IP?
Currently for the "www":
resource siteWww 'Microsoft.Web/sites@2021-03-01' = {
name: 'www-foilen-lab-me'
location: location
kind: 'app,linux,container'
properties: {
serverFarmId: serverFarmsId
reserved: true
httpsOnly: true
siteConfig: {
alwaysOn: true
numberOfWorkers: 1
linuxFxVersion: 'DOCKER|foilen/az-docker-apache_php:7.4.9-3'
}
}
}
resource dnsWww 'Microsoft.Network/dnsZones/CNAME@2018-05-01' = {
parent: dnsZone
name: 'www'
properties: {
TTL: 3600
CNAMERecord: {
cname: '${siteWww.name}.azurewebsites.net'
}
}
}
And I would like to create something like:
resource dns 'Microsoft.Network/dnsZones/A@2018-05-01' = {
parent: dnsZone
name: '@'
properties: {
TTL: 3600
ARecords: [
{
ipv4Address: '${siteWww.xxxxxxxx}'
}
]
}
}
thanks