我正在尝试在 Azure 私有 DNS 区域中使用ARM template
. 记录创建成功,但没有 IP,也没有 TTL。我的模板如下:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"DNSZoneName": {
"type": "string",
"defaultValue": "privatelink.database.windows.net",
"metadata": {
"description": "The name of the DNS zone. Must have at least 2 segements, e.g. hostname.org"
}
},
"newRecordName": {
"type": "string",
"defaultValue": "pe-sql3",
"metadata": {
"description": "The name of the DNS record to be created. The name is relative to the zone, not the FQDN."
}
}
},
"resources": [
{
"type": "Microsoft.Network/privateDnsZones/A",
"apiVersion": "2018-09-01",
"name": "[concat(parameters('DNSZoneName'), '/', parameters('newRecordName'))]",
"location": "global",
"properties": {
"TTL": 3600,
"ARecords": [
{
"ipv4Address": "10.0.0.1"
}
]
}
}
]
}
我的命令是New-AzResourceGroupDeployment -ResourceGroupName myRg -TemplateFile deploy.json
任何的想法?