Let's automate the manual tasks that have been implemented so far.
Creating an Azure DNS zone using PowerShell is pretty easy, you only need to run the following cmdlet:
New-AzureRmDnsZone -Name Gamezakhana.com -ResourceGroupName PacktPub
Like PowerShell, you can create an Azure DNS zone using Azure CLI 2.0 with only one command:
az network dns zone create --resource-group PacktPub --name Gamezakhana.com
To create an Azure DNS record using PowerShell, you need to create the RecordConfig
and store it within a variable by running the following cmdlet:
$RecordConfig = New-AzureRmDnsRecordConfig -IPv4Address "192.168.1.55"
Then, you can create the record by running the following cmdlet:
New-AzureRmDnsRecordSet -Name www -RecordType A -ZoneName Gamezakhana.com -ResourceGroupName PacktPub -Ttl 3600 -DnsRecords $RecordConfig
Remember that the TTL is expressed...