I am trying to create a CNAME record in Azure DNS via Powershell (Actually trying to create a series of records but happy to start with one)
I found the following:
Get-AzDnsRecordSet -Name NAME -RecordType CNAME -ResourceGroupName RESOURCEGROUPNAME -ZoneName domain.com
| Add-AzDnsRecordConfig -Cname ALIAS
| Set-AzDnsRecordSet
But, when I use that I get
Get-AzDnsRecordSet: The resource record 'NAME' does not exist in resource group 'RESOURCEGROUPNAME' of subscription 'XXX'.
But, NAME is not a current CNAME record.
I'm trying to get a record that ends up with
NAME CNAME 600 ALIAS
What am I missing and where do I set the TTL value?
This did the trick (after some more research)